Methods of payment Abuse

ss (Socket Statistics) utility on Linux

22.07.2023, 13:55

The ss (Socket Statistics) utility in Linux provides information about network sockets, TCP/UDP connections, routing, and other network statistics. It is an alternative to the outdated netstat utility.

Program Features

The ss (Socket Statistics) utility in Linux provides information about network sockets, TCP/UDP connections, routing, and other network statistics. Below are some features of the ss utility:

  1. Speed: It is faster and more efficient compared to the outdated netstat utility. It uses the new Netlink mechanism to get information about network connections.
  2. Connection Details: Allows you to view detailed information about network connections, such as local and remote IP address, port, connection status, timeouts, process IDs, etc.
  3. Filtering and Sorting: Allows you to filter and sort the output by various parameters, such as IP address, port, connection status and process ID. This allows you to get a more convenient and understandable output.
  4. Support for various protocols: Supports viewing TCP, UDP, DCCP, Unix domain sockets, RAW and other protocols.
  5. Routing Information: Shows routing information, including routing tables, firewall rules, etc.
  6. IPv6 Support: Fully supports IPv6 and allows you to view connections and statistics for IPv6 networks.
  7. Convenient use: It has a simple and intuitive command-line syntax, and also offers various options and flags for obtaining specific information about network connections.

The ss utility is a powerful tool for analyzing and monitoring network connections in Linux and allows you to get detailed information for diagnosing and optimizing network applications.

SS installation procedure

To use the ss utility on Linux, follow these steps:

  1. Open the terminal.
  2. Type the command `ss` and press Enter.
  3. Usage examples:

`ss -t': shows active TCP connections.

`ss -u': shows active UDP connections.

`ss -tlp': shows TCP connections and their associated processes.

`ss -ulp': shows UDP connections and their associated processes.

`ss -s`: shows general statistics on socket types.

If necessary, you can use various options and filters to get specific information. Use the 'man ss` command for more information about the ss utility and its options. The ss utility allows you to quickly get information about network connections, service sockets and other network statistics.

How to remove ss (Socket Statistics) in Linux?

If you want to remove the installed ss package on Linux, follow these instructions:

  1. Open the terminal.
  2. Enter the following command that corresponds to your distribution: for Debian/Ubuntu: `sudo apt-get remove iproute2`; for CentOS/Fedora: `sudo yum remove iproute`; for Arch Linux: `sudo pacman -R iproute2`
  3. Press Enter to execute the command.
  4. Enter the administrator password (root) if required.
  5. Confirm the package deletion by entering "y" if required.

Wait until the deletion process is completed. After completing these steps, the ss package should be completely removed from your system.