Show listening TCP/UDP sockets and associated processes.
ss -tulpnShow socket information. The flags below list listening TCP and UDP ports.
ss [OPTIONS] [FILTER]Show listening TCP/UDP sockets and associated processes.
ss -tulpnList established TCP connections numerically.
ss -tan state established| Option / clause | Description |
|---|---|
-t, --tcp | Display TCP sockets. |
-u, --udp | Display UDP sockets. |
-l, --listening | Display listening sockets. |
-n, --numeric | Do not resolve service names or addresses. |
-p, --processes | Show the process using each socket (permissions may limit details). |
-a, --all | Display listening and non-listening sockets. |
-s, --summary | Print socket usage summary. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.