Find Out Which Process Is Listening Upon a Port

How do I find out running processes were associated with each open port? How do I find out what process has open tcp port 111 or udp port 7000 under Linux?You can the following programs to find out about port numbers and its associated process:

netstat – a command-line tool that displays network connections, routing tables, and a number of network interface statistics.

fuser – a command line tool to identify processes using files or sockets.

lsof – a command line tool to list open files under Linux / UNIX to report a list of all open files and the processes that opened them.

/proc/$pid/ file system – Under Linux /proc includes a directory for each running process (including kernel processes) at /proc/PID, containing information about that process, notably including the processes name that opened port.

Check For rootkit

I strongly recommend that you find out which processes are really running, especially servers connected to the high speed Internet access. You can look for rootkit which is a program designed to take fundamental control (in Linux / UNIX terms “root” access, in Windows terms “Administrator” access) of a computer system, without authorization by the system’s owners and legitimate managers. See how to detecting / checking rootkits under Linux.