List all listening ports with ss
Show every TCP and UDP socket in listening state with the owning process name and PID — the modern replacement for netstat.
01Command
$ sudo ss -tulpn02What it does
The flag letters map directly: t TCP, u UDP, l listening only, u+p shows the owning process, n prints numeric ports and IPs instead of resolving names. The Local Address:Port column tells you where a service listens; 0.0.0.0:22 or [::]:22 means all interfaces, 127.0.0.1:3306 means localhost only. ss reads netlink directly so it is fast and accurate even with many sockets, unlike netstat. To check one port, filter with sudo ss -tulpn 'sport = :8080', and remember that whether a port is reachable externally also depends on firewall rules.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ss(8) — another utility to investigate socketsEvidence: The ss man page documents -t (TCP), -u (UDP), -l (listening), -p (show process), and -n (numeric ports/addresses).
Last verified: 2026-09-17 · Category: Network
06Related solutions
Launch an interactive process viewer with color meters for CPU cores, memory, and swap, plus search, sort, and kill controls.
The classic forgotten-syntax command: `traceroute` shows every router between you and a destination plus the round-trip time of probes to each hop.
Send a HEAD request to any URL and print the status line, server, content type, caching, and redirect headers.