Open ports
Commands for listing listening ports and the processes that own them.
Check which ports are open
Section titled “Check which ports are open”The following command helps find which process is using which port:
netstat -plantThe following command prints open network files (sockets):
lsof -i