ss Cheat Sheet
Socket statistics — listening ports, established connections, and who owns each socket. The modern netstat.
Networking3 sections · 15 commands
⌘K
Listening Sockets
5ss -tlnpListening TCP sockets + owning process
ss -ulnpListening UDP sockets
ss -tulnpTCP and UDP together
ss -tlnp sport = :443Who is on port 443
ss -tlnp | grep :8080Grep for a port
Connections & State
6ss -tnAll TCP connections (numeric)
ss -tn state establishedOnly established links
ss -tn state time-waitSockets in TIME_WAIT
ss -oAdd connection timers
ss -tan | awk '{print $1}' | sort | uniq -cCount of each TCP state
ss -iPer-socket internal info (cwnd, rtt)
Stats & Domain
4ss -sConnection counts by state
ss -xUnix domain sockets
ss -x dst /var/run/docker.sockSockets connected to a socket file
ss -lAll listening sockets