To show listening sockets in Unix, the "netstat" utility can be used with different arguments, depending on the specific OS.
Man netstat:
Quote:
--numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user names.
-e, --extend
Display additional information. Use this option twice for maximum detail.
-p, --program
Show the PID and name of the program to which each socket belongs.
-l, --listening
Show only listening sockets. ...