To see the list of programs listening on TCP ports, use the following commands.
For FreeBSD:
# sockstat -4
For Linux (Debian, CentOS, as well as Ubuntu, RedHat, etc.):
# netstat -nlp
These commands print a list of programs (services) and the ports they're listening on.
Comments