Forrest logo
tool overview
On this page you find all important commands for the CLI tool ss. If the command you are looking for is missing please ask our AI.

ss

The command line tool "ss" stands for "socket statistics" and is used in Linux systems to display detailed information about network sockets, interfaces, and network connections. It is considered a replacement for the old "netstat" command.

  1. The "ss" command is used primarily for debugging and monitoring network activity on a Linux system.
  2. It provides information on socket states, such as established, listening, or closed.
  3. It can display information about both IPv4 and IPv6 connections.
  4. The output of the "ss" command can be filtered using several options, allowing users to focus on specific network connections or socket states.
  5. It shows details like the address and port number for each connection, the amount of data transferred, and the process ID associated with each socket.
  6. The "ss" command provides a reliable way to gather information about network connections, making it useful for troubleshooting network-related issues.
  7. It is often used in combination with other command line tools, such as "grep" or "awk", to perform more advanced network analysis or filtering tasks.

List of commands for ss:

  • ss:tldr:0d58e ss: Show all TCP/UDP/RAW/UNIX sockets.
    $ ss -a ${select}
    try on your machine
    explain this command
  • ss:tldr:27c31 ss: Kill IPv4 or IPv6 Socket Connection with destination IP 192.168.1.17 and destination port 8080.
    $ ss --kill dst ${192-168-1-17} dport = ${8080}
    try on your machine
    explain this command
  • ss:tldr:2cb15 ss: Show all TCP sockets listening on the local 8080 port.
    $ ss -lt src :${8080}
    try on your machine
    explain this command
  • ss:tldr:3e084 ss: Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16.
    $ ss -4t src ${192-168-16}
    try on your machine
    explain this command
  • ss:tldr:4a7ae ss: Filter TCP sockets by states, only/exclude.
    $ ss ${state-exclude} ${bucket-big-connected-synchronized----}
    try on your machine
    explain this command
  • ss:tldr:96a00 ss: Show all UDP sockets connected on specific source and destination ports.
    $ ss -u 'sport == :${source_port} and dport == :${destination_port}'
    try on your machine
    explain this command
  • ss:tldr:cfb8f ss: Show all TCP sockets along with processes connected to a remote ssh port.
    $ ss -pt dst :${ssh}
    try on your machine
    explain this command
  • ss:tldr:d89a2 ss: Show all TCP sockets connected to the local HTTPS port (443).
    $ ss -t src :${443}
    try on your machine
    explain this command
tool overview