ss command
Show open ports and network connections.
- Networking
- Package iproute2
- 7 options · 5 examples
Syntax
ss [options] [filter]Provided by the iproute2 package. Run man ss for the full manual.
Common options
| Option | What it does |
|---|---|
-t | TCP |
-u | UDP |
-l | Only listening sockets |
-n | Numeric ports and addresses |
-p | Show the process |
-a | All sockets |
-s | Summary |
Examples
Listening TCP and UDP ports with processes
sudo ss -tulpnListening TCP ports only
ss -tlnWhat is using port 80
sudo ss -tlpn 'sport = :80'Established connections
ss -tn state establishedConnection summary
ss -s
No example matches. Check the options table or search the guides.
Tips
ssreplacesnetstat;netstat -tulpnis the old equivalent.
ss guides
- How to Install netstat Command in Linux Linux Commands · Updated Apr 2025
- A Comparison Between ss vs netstat Commands Linux Commands · Updated Apr 2025
- bash: netstat: command not found – Ubuntu/Debian Shell Scripting · Updated Apr 2025
