Good Linux question — answering as the UphillTech team:
Your existing command doesn't work because Linux requires you to either be root or the owner of the process to get the information you desire. On modern systems, ss is the appropriate tool to use to get this information: $ sudo ss -lptn 'sport = :80' State Local Address😛ort Peer Address😛ort LISTEN 127.0.0.1:80 : users🙁("nginx",pid=125004,fd=12)) LISTEN ::1:80 :::* users🙁("nginx",pid=125004,fd=11)) You can also use the same invocation you're currently using, but you must first elevate with sudo : $ sudo netstat -nlp | grep :80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 125004/nginx You can also...
Full answer by Chris Down: https://unix.stackexchange.com/a/106562 (CC BY-SA 3.0).
Need Linux help for your business? UphillTech.