Investigate socket statistics — the modern, faster replacement for netstat.
low risk
ss queries the kernel directly for socket information — faster and more accurate than netstat. -tulnp is the canonical combination: TCP, UDP, Listening, Numeric, with Process info. Use to verify which services listen on which ports.
| Flag | Meaning |
|---|---|
-t --tcp | Show TCP sockets |
-u --udp | Show UDP sockets |
-l --listening | Show only listening sockets |
-n --numeric | Don't resolve service names or hostnames |
-p --processes | Show the process using each socket |
-4 | Show only IPv4 sockets |
-6 | Show only IPv6 sockets |
ss -tulnpShow all listening TCP/UDP ports with process names — standard network debug command · explain & risk-check →ss -tnp state establishedShow established TCP connections with processes · explain & risk-check →ss -tulnp | grep :443Check which process is listening on HTTPS port 443 · explain & risk-check →Use `ss -s` for a quick socket count summary by state — great for spotting connection storms or TIME_WAIT buildup.
Reference text is hand-written and may be incomplete — check man ss for your version. Test destructive commands on a non-production system first.