commands
ss — Inspect sockets
Displays socket information. -l selects listening sockets (including unconnected UDP as applicable), -t TCP, -u UDP, -n numeric names. Process visibility depends on permissions. Use a fresh private workspace; live operations are VM-only.
Formal Syntax & Structure
linux syntaxlinux
ss [OPTIONS] [FILTER]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -l | option | Listening |
| -t | option | TCP |
| -u | option | UDP |
| -n | option | Numeric |
| FILTER | operand | Socket filter |
Return Value
exit status and output
Displays socket information. -l selects listening sockets (including unconnected UDP as applicable), -t TCP, -u UDP, -n numeric names. Process visibility depends on permissions.
Working Example
Example Snippetlinux
python3 local_network.py ss