Linux – Find the process which occupies a specific port

Either one of the following commands could show you the process which is running a specific port

  • lsof -i :<port>
  • netstat -tulpn | grep :<port>

 

Here is an example on my Ubuntu server.

root@li266-91:~# netstat -tulpn | grep :80
tcp   0   0 0.0.0.0:80   0.0.0.0:*   LISTEN   31024/apache2

Apache is running on port 80.

Done =)

Reference: How do I determine which application is using port 8080?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.