ss — sockets and ports
cheat sheet · Ubuntu 24.04 · iproute2 https://lab.dimsanych.ru/en/wiki/ss/Cheat sheet
-
ss -tlnplistening ports + who -
ss -tnpactive connections -
ss -tulnpTCP+UDP listeners -
ss -tlnp 'sport = :80'who's on port 80 -
ss -tan state close-waita socket leak? -
ss -sstatistics
Options
Mnemonic for the common combo -tlnp: tcp listening numeric
process. -n matters on slow networks: without it ss tries to
resolve every address into a name, and the output noticeably slows down.
-p needs root to show other users' processes — without sudo you'll only
see your own.