Gary Kuhlmann - July 23, 2012
Recently, I had an issue where a service would not start because there was a conflict on the port that it was trying to use. This command made it easy to identify which service was already using the port:
Here is the explanation of each argument:
-l = Show only listening sockets. (These are omitted by default.)
-n = Show numerical addresses instead of trying to determine symbolic host, port or user names.
-p = Show the PID and name of the program to which each socket belongs.
-t = tcp
-u = udp