How To Install Ss?
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|-x
Click to copyFilter TCP sockets by states, only/exclude:ss state/exclude bucket/big/connected/synchronized/...
Click to copyShow all TCP sockets connected to the local HTTPS port (443):ss -t src :443
Click to copyShow all TCP sockets along with processes connected to a remote ssh port:ss -pt dst :ssh
Click to copyShow all UDP sockets connected on specific source and destination ports:ss -u 'sport == :source_port and dport == :destination_port'
Click to copyShow all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16:ss -4t src 192.168/16
Click 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 2024 package in your OS.