How do I find out what process is using a particular port?

How do I find out what process is using a particular port?

Ports are held open in the same way as files are, by file handles within
the process. In most states, a port will also have a handle into another
process on the other side of that connection. If you need to find out
which process is holding open a particular port, run lsof
(ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof) and grep for the
port number.

Thanks to Stuart Whitby



Home
FAQ