Inspect open sockets with ss
See which services listen on which ports and who is connected — the modern netstat replacement.
01Command
$ sudo ss -tulpn02What it does
ss talks to the kernel directly via netlink, so it is faster and more complete than netstat on current kernels and shows states like TIME-WAIT in bulk. -t/-u select TCP/UDP, -l limits to listening sockets, -n keeps port numbers un-translated, and -p reveals the process behind each socket. You can filter precisely, e.g. ss -tn 'dport = :443'.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ss(8) — Arch Manual PagesEvidence: Same options documented for ss, another utility to investigate sockets.
- ss(8) — Debian bookwormEvidence: Documents -t/--tcp, -u/--udp, -l/--listening, -p/--processes and -n/--numeric for the socket statistics tool.
Last verified: 2026-09-19 · Category: Network
06Related solutions
Show every TCP and UDP socket in listening state with the owning process name and PID — the modern replacement for netstat.
One command that prints every interface with its state and IPv4/IPv6 addresses in a short table — the modern, memorable replacement for digging through `ifconfig` or the verbose `ip addr` output.
Launch an interactive process viewer with color meters for CPU cores, memory, and swap, plus search, sort, and kill controls.