Link Search Menu Expand Document

How to find the process listening on a given port

Use one of the following commands to resolve an open port to a running process.

How to use lsof

lsof -i :80

Alternative using netstat

netstat -tlnp | grep :80

Alternative using ss

Using ss has the advantage of given the full process name (not truncated like netstat) and also prints all PIDs having the port open, as lsof does.
ss -tlnp | grep :80