Linux

...now browsing by tag

 
 

How to find out who is using a port in LINUX

Thursday, March 19th, 2009

I keep having to look this up.

The linux fuser command has a special option for port conflicts.

Use fuser -n tcp for tcp ports to see which process is using the port.

For example to see which application is already using port 80 use:

$ fuser -n tcp 80

The netstat command can also be used to determine what process is using a port.

Use netstat -nlp and you should see PID and names of programs along with the port they are using (note you can only see the PID of process you own, unless running as root)

$ netstat –nlp

From here.

Twitter It!