ss: show established TCP connections
Show established TCP connections with process info
ss -tanp | grep ESTAB
- tool
- lsof19 commands
More lsof commands
-
ss -ulnpList listening UDP ports with process names
-
ss -sPrint a socket summary grouped by state
-
ss -tnp dst :443Show connections that go to port 443
-
lsof -nP -i :<port>Show which process uses a port; -nP skips DNS and service name lookups, so it is faster
-
lsof -nP -iTCP -sTCP:LISTENList every listening TCP socket with its PID, without name lookups; the newer way is ss -ltnp