Windows
Linux
Networking
Windows netstat equivalent in Linux
Displays active network connections, listening ports, and socket statistics.
Windows
→
netstat
Linux equivalents
ss -tuln
ss -tuln
ss -tuln
Overview
What this command does
Displays active network connections, listening ports, and socket statistics.
Migration tip: While
netstat still works on Linux, ss is the modern replacement — it's faster and shows more information.Practical tasks
Common use cases
Show network connections
Displays active network connections, listening ports, and socket statistics.
ss -t
Show TCP connections
ss -u
Show UDP connections
ss -l
Show listening sockets only
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
ss -tuln
ss -tulnp
ss -tp
Walkthrough
Examples with explanations
# Windows: netstat -an
ss -tuln # show all listening TCP/UDP ports
ss -tulnp # include the process name
# Windows: netstat -b (show processes)
ss -tp # TCP connections with process info
Reference
Common options and variations
| Command or option | Use |
|---|---|
ss -t | Show TCP connections |
ss -u | Show UDP connections |
ss -l | Show listening sockets only |
ss -n | Show numbers (no DNS lookups) |
ss -p | Show which process owns each socket |
ss -tuln | The most common combination |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | ss -tuln |
Same command on this distribution. |
| Fedora | same command | ss -tuln |
Same command on this distribution. |
| Arch | same command | ss -tuln |
Same command on this distribution. |
Keep learning