• Contact: +91-08069248012

Check port usage in linux


If you want to see which process is using which port (in this case, port 80), you can do it with the following command:

# netstat -tulpn| grep :80

This gives the following output:

tcp        0      0 :::80                       :::*                        LISTEN      8879/httpd

As you can see, apache (httpd) is using port 80 on PID 8879.
You can also do it with other ports by replacing the number (80) by another port.