ss: show all TCP connections
Filter established TCP connections with process info
ss -tanp | grep ESTAB
- tool
- lsof19 commands
More lsof commands
-
ss -ulnpList UDP listening ports with process names
-
ss -sPrint socket usage summary by state
-
ss -tnp dst :443Show connections going TO port 443
-
lsof -nP -i :<port>Show which process owns a port; -nP skips DNS/service name lookups for speed
-
lsof -nP -iTCP -sTCP:LISTENList every TCP listener with PID, no name resolution; modern: ss -ltnp