ss

How To Install Ss?

How To Install Ss?

ss

Utility to investigate sockets.

Maintainer: Alexander Wirt



Section: net

Install ss

  • Debian apt-get install iproute2 Click to copy
  • Ubuntu apt-get install iproute2 Click to copy
  • Alpine OS apk add iproute2 Click to copy
  • Arch Linux pacman -S iproute2 Click to copy
  • Kali Linux apt-get install iproute2 Click to copy
  • CentOS yum install iproute Click to copy
  • Fedora dnf install iproute Click to copy
  • Raspbian apt-get install iproute2 Click to copy

Utility to investigate sockets.

How to use ss?

Below are few example commands for ss that you can use in the terminal.

Show all TCP/UDP/RAW/UNIX sockets:
ss -a -t|-u|-w|-xClick to copy
Filter TCP sockets by states, only/exclude:
ss state/exclude bucket/big/connected/synchronized/...Click to copy
Show all TCP sockets connected to the local HTTPS port (443):
ss -t src :443Click to copy
Show all TCP sockets along with processes connected to a remote ssh port:
ss -pt dst :sshClick to copy
Show all UDP sockets connected on specific source and destination ports:
ss -u 'sport == :source_port and dport == :destination_port'Click to copy
Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16:
ss -4t src 192.168/16Click to copy
Installing ss command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora and Raspbian operating systems. Once you run the command it will install the latest version of ss 2023 package in your OS.