April 25, 2009

How to check who owns which port ?

Linux contains a lot of command line tools which make the job of a network administrator easier. One of them is netstat. Netstat is a multi-purpose network information tool. Using netstat, you can find which port is used by which process or user by using the following command:


# netstat -an | more

example : let say i would like to verify that, how own the telnet port

# netstat -nap | grep :23


There is a utility/command and called 'fuser' which also tells you which user and process owns a port

# fuser -v -n tcp 23

No comments:

Post a Comment