Where to start First steps track · 15 stages
Linux Labs

ss — sockets and ports

cheat sheet · Ubuntu 24.04 · iproute2 https://lab.dimsanych.ru/en/wiki/ss/

Cheat sheet

  • ss -tlnp listening ports + who
  • ss -tnp active connections
  • ss -tulnp TCP+UDP listeners
  • ss -tlnp 'sport = :80' who's on port 80
  • ss -tan state close-wait a socket leak?
  • ss -s statistics

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.

Loading…