$ ss
Investigate sockets
DOCUMENTEDNetworkingUbuntu 24.04 LTS baseline
Synopsis
ss [options] [ FILTER ]
What it does
- `ss` displays socket statistics and can show listening or established connections.
- `-l` limits output to listening sockets, `-t` selects TCP sockets, and `-n` avoids name/service resolution.
Examples
Show listening TCP sockets
ss -ltnShow listening sockets with processes
sudo ss -lntpImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.