ss
also: socket statistics
ss is a command-line utility that displays socket statistics and network connections on a Linux system, replacing the older netstat tool with improved performance and output.
ss stands for "socket statistics" and shows information about network sockets, TCP/UDP connections, listening ports, and network protocol statistics. It reads directly from kernel data structures, making it much faster than netstat on modern systems.
Common uses include viewing active connections (ss -t for TCP, ss -u for UDP), listing listening ports (ss -l), and filtering by state or port. For example, ss -tlnp shows all listening TCP sockets with numeric addresses and associated process information.
Unlike netstat, which parses /proc files, ss queries the kernel's netlink interface directly, providing better performance on systems with thousands of connections.