To list the processes listening on a specific port, you can use lsof.
lsof -i :
So for example, to see what’s listening on port 80:
lsof -i :80
The output will look similar to this:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
httpd 21149 apache 3u IPv4 55419598 TCP *:http (LISTEN)
httpd 21150 apache 3u IPv4 55419598 TCP *:http (LISTEN)
httpd 21151 apache 3u IPv4 55419598 TCP *:http (LISTEN)
