Networking HowTos
Networking HowTos

Display process name and ID of network connections

February 12, 2012 Linux

The netstat command on Linux shows you any active and listening network connections on the computer. If there is a connection active that you are not sure what it is, you can use the ‘-p’ (or ‘–programs’) parameter to show the process id (PID) and process name of the network connection/socket.
Example:

Note: to use the -p parameter, you need to have root privileges, otherwise the ‘PID/Program name’ field will just display ‘-‘.

You Might Also Like