Skip to content

ss command

Show open ports and network connections.

  • Networking
  • Package iproute2
  • 7 options · 5 examples
On this page

Syntax

ss [options] [filter]

Provided by the iproute2 package. Run man ss for the full manual.

Common options

OptionWhat it does
-tTCP
-uUDP
-lOnly listening sockets
-nNumeric ports and addresses
-pShow the process
-aAll sockets
-sSummary

Examples

  1. Listening TCP and UDP ports with processes

    sudo ss -tulpn
  2. Listening TCP ports only

    ss -tln
  3. What is using port 80

    sudo ss -tlpn 'sport = :80'
  4. Established connections

    ss -tn state established
  5. Connection summary

    ss -s

Tips

  • ss replaces netstat; netstat -tulpn is the old equivalent.

ss guides

← All Linux commands · Suggest a fix

Back to top