command to inentify the process that is listening in a port.

Martin Hudec corwin at aeternal.net
Mon Apr 9 15:37:07 UTC 2007


Siju George wrote:
> How Do you actually Identify what process is listening on a TCP/IP port?
> "nmap" does not usually give the right answer.
> There should be some command that can be run on the local host for
> identification right?

man lsof

5:35pm [amber] ~# lsof -i @localhost:123
COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
ntpd    552 root   10u  IPv4 0xc4c46000      0t0  UDP localhost:ntp

Martin


More information about the freebsd-questions mailing list