ss Commands Reference
Socket statistics from iproute2 โ the modern replacement for netstat when checking listeners and established TLS connections.
๐ฆ Availability
# Usually preinstalled with iproute2
ss -V
# Debian/Ubuntu: sudo apt install iproute2๐ Listening ports
ss -tulpn # TCP/UDP listeners with process names
ss -tlnp 'sport = :443' # Who is listening on 443
ss -tlnp 'sport = :80'๐ Established connections
ss -tpn # Established TCP + processes
ss -tpn 'dport = :443' # Outbound HTTPS
ss -tpn 'sport = :443' # Inbound HTTPS
ss -s # Summary statistics๐ ๏ธ Useful filters
ss -tan state syn-sent
ss -tan state time-wait
ss -ltn src 10.0.0.0/8
ss -H -o state established '( dport = :443 or sport = :443 )'-p often needs root to show other users' processes.