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

NameTypeDescription
-loptionListening
-toptionTCP
-uoptionUDP
-noptionNumeric
FILTERoperandSocket 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
Linux Reference