ssDisplays a list of all active non-listening network connections.
Provides a rapid overview of currently occupied socket streams.
The modern Linux socket statistics tool: lists listening ports, established connections and the processes behind them, faster than netstat.
sudo apt install iproute2ssDisplays a list of all active non-listening network connections.
Provides a rapid overview of currently occupied socket streams.
ss -sPrints a high-level summary of system-wide socket statistics (-s).
Shows a breakdown of active, listening, and closed sockets by protocol.
ss -aDisplays all sockets, including both listening and established states (-a).
Full visualization of the system's entire active and passive network footprint.
ss -lLists only sockets currently in a listening state (-l).
Identifies all services waiting for incoming connection requests on the host.
ss -tFilters the output to display only TCP protocol sockets (-t).
Limits analysis to connection-oriented Transmission Control Protocol sessions.
ss -uFilters the output to display only UDP protocol sockets (-u).
Displays active and recently used User Datagram Protocol datagram streams.
ss -wDisplays information about active RAW sockets (-w).
Enables visibility of low-level protocol access often used by diagnostic tools.
ss -xLists active UNIX domain sockets used for local IPC (-x).
Provides visibility into internal communication between local system processes.
ss -ltLists all TCP sockets currently in a listening state (-lt).
Focuses on available TCP-based server services currently active on the host.
ss -luLists all UDP sockets that are actively receptive to packets (-lu).
Identifies open UDP ports that are ready to process incoming datagrams.
ss -lxLists all listening UNIX domain sockets for local services (-lx).
Identifies active IPC endpoints waiting for internal application connections.
ss -pShows the PID and process name for each active socket (-p).
Critically links all network communications to their initiating system processes.
ss -lpLists listening sockets with their associated process information (-lp).
Identifies which software binaries are responsible for each open port.
ss -pt state establishedLists established TCP connections and their owning software processes.
Identifies exact binaries responsible for all currently active transport sessions.
ss -N netns1Queries sockets within a specific non-default network namespace.
Enables auditing of containerized or isolated network environments.
ss -lntDisplays listening TCP sockets with numerical ports (-lnt).
Standard method for quickly auditing open server ports without DNS latency.
ss -lntpDisplays listening TCP sockets with PIDs and numeric ports (-lntp).
Essential admin command for identifying and auditing every local server service.
ss -lnupDisplays listening UDP sockets with PIDs and numeric ports (-lnup).
Enables auditing of datagram-based services and their corresponding binaries.
ss -eShows extended socket info including owner UID and inode (-e).
Provides security context and file-system reference for each network socket.
ss -empCombines extended info, memory stats, and process IDs (-emp).
The definitive view for deep-dive technical auditing of individual sockets.
ss -OAlias for printing keepalive and retransmission timer data (-O).
Identifies protocol-level timeouts and connection health metrics.
ss -oDisplays network timer information for each socket (-o).
Includes keepalive and retransmission states for protocol health diagnosis.
ss -mDisplays detailed memory usage for each network socket (-m).
Enables identification of socket-level resource exhaustion or performance issues.
ss -tmDisplays memory allocation statistics specifically for TCP sockets.
Identifies potential buffer leaks or resource-heavy transport sessions.
ss -ltmShows detailed memory footprints for all listening TCP services.
Enables resource auditing of server-side applications and their network buffers.
ss -iDisplays internal TCP protocol metrics including RTT and cwnd (-i).
Deep diagnostic tool for analyzing transport layer efficiency and congestion.
ss -tiAnalyzes internal TCP metrics to diagnose latency and throughput issues.
Exposes RTT and congestion window data for transport-layer optimization.
ss -tieCombines extended attributes with internal protocol metrics (-tie).
Maximal diagnostic view for auditing both security context and protocol health.
ss state establishedFilters output to only show successfully ESTABLISHED connections.
Focuses analysis on active, live communication sessions between hosts.
ss state connectedFilters for all sockets in any successfully connected state.
Excludes passive listeners to focus on outgoing and established flows.
ss state listeningSpecifically filters the list for sockets in the LISTENING state.
Enables systematic auditing of all available network-accessible local services.
ss -t state time-waitLists TCP sockets currently in the TIME-WAIT state.
Identifies connections that have recently closed but are still in the final timeout.
ss -t state close-waitLists TCP sockets stuck in the CLOSE-WAIT state.
Often indicates an application failure to properly terminate its network sessions.
ss -t state fin-wait-1Shows sockets in FIN-WAIT-1, waiting for remote acknowledgment of a close.
Useful for diagnosing half-closed or hung session termination sequences.
ss -t state syn-sentDisplays sockets currently attempting to initiate a new connection (SYN sent).
Identifies active outbound connection attempts and potential timeouts.
ss -t state syn-recvDisplays sockets processing an incoming connection request (SYN received).
Identifies current high rates of connection establishment or potential SYN flooding.
ss -4 state closingFilters output for IPv4 sockets in the CLOSING state.
Used to identify legacy protocol sockets currently in the process of shutting down.
ss dport = :80Filters sockets where the remote destination port is 80 (HTTP).
Isolates all active web browsing or outgoing HTTP API traffic.
ss sport = :22Filters connections where the local source port is 22 (SSH).
Enables auditing of incoming remote administrative access sessions.
ss dport = :sshUses service name 'ssh' instead of numeric port 22 for filtering.
Provides a more readable approach to service-based socket auditing.
ss dport > :1024Lists connections using non-privileged destination ports (> 1024).
Identifies traffic to dynamic or non-standard server services.
ss sport < :1024Lists connections originating from local privileged ports (0-1023).
Monitors traffic from authenticated system services or administrative tasks.
ss dport >= :5000Filters for connections targeting ports 5000 and higher.
Narrows focus to modern web frameworks or specialized custom server listeners.
ss sport le :100Filters for local source ports less than or equal to 100.
Focuses audit on core foundational system services like DNS, HTTP, or FTP.
ss dst 192.168.1.1Filters for all sockets specifically destined for the IP 192.168.1.1.
Isolates communication with a particular network host or gateway.
ss src 10.0.0.5Filters for sessions originating from a specific local interface IP.
Determines which local ethernet adapter or virtual IP is handling specific flows.
ss dst 192.168.1.0/24Filters connections for an entire CIDR-defined destination subnet.
Enables broad auditing of traffic to a specific department or network segment.
ss src 127.0.0.0/8Filters for traffic originating from the local loopback subnet.
Makes all internal, on-host service communications visible for audit.
ss -nt state establishedShows established TCP connections numerically for fast processing.
Standard high-performance method for watching live system communication.
ss -nt '( dport = :80 or dport = :443 )'Uses logical OR to filter for both HTTP and HTTPS TCP connections.
Provides a consolidated view of all active web-traffic transport sessions.
ss -nt dst :443 state establishedFilters specifically for established connections to remote port 443.
Identifies all and only live encrypted web or API session data.
ss -nt dport != :22Displays all TCP connections except those on the SSH port (22).
Filters out administrative noise to focus on other active network services.
ss -lp src :8080Reveals the exact process listening on local port 8080.
Directly identifies the software application responsible for a specific port.
ss -a -A tcpUses the family flag to select all active TCP sockets in the system.
Comprehensive view of all Transmission Control Protocol states.
ss -a -A udpUses the family flag to select all active UDP sockets in the system.
Full visualization of User Datagram Protocol usage across the host.
ss -A unixExplicitly selects only Unix domain socket address family members.
Focuses reconnaissance on local platform-specific inter-process flow.
ss -A packetDisplays raw packet sockets used by sniffers and diagnostic tools.
Identifies applications performing direct link-layer network interaction.
ss -A netlinkShows Netlink sockets for internal kernel-to-user space messaging.
Enables visibility into system configuration and routing update channels.
ss --vsockDisplays VSOCK sockets for host-to-guest communication in VMs.
Identifies internal transport links between the hypervisor and virtual machines.
ss --xdpDisplays eXpress Data Path (XDP) network sockets.
Enables visibility into high-performance, kernel-bypass packet processing.
ss -o state connectedLists all connected sockets with integrated timestamp and timer data.
Provides a temporal context for analyzing session longevity and health.
ss -4 -t -n state establishedPrecise filter for established legacy IPv4 TCP sessions numerically.
High-speed method for monitoring traditional server-client communication flows.
ss -D /tmp/ss.dumpDumps current system-wide socket state to a binary file (-D).
Enables capturing a high-fidelity snapshot for future forensic playback.
ss -F /tmp/ss.dumpRestores and displays socket data from a previous binary dump (-F).
Enables detailed time-travel analysis of historical network states.
ss -f inetForces address family to IPv4 for the current filter task.
Ensures subsequent commands only process legacy internet protocol data.
ss -f inet6Forces address family to IPv6 for the current filter task.
Limits output strictly to modern next-generation IP transport data.
ss -f linkDisplays all Link Layer (MAC layer) sockets in the system.
Provides visibility into the absolute lowest level of network stack interface.
ss -f vsockFilters for virtual machine guest-to-host VSOCK sockets.
Exposes internal virtualization-layer transport channels for audit.
ss -t -a -ZLists all TCP sockets including SELinux security labels (-a -Z).
Essential for auditing mandatory access control policies on network objects.
ss -MAlias for dumping binary socket statistics to a local file (-M).
Provides a rapid method for capturing raw transport layer state data.
ss state synchronizedFilters for synchronized states (ESTABLISHED, SYN-RECV, FIN-WAIT).
Identifies sessions that have successfully completed a handshake phase.
ss state bucketFilters for 'bucket' minisockets like TIME-WAIT and SYN-RECV.
Optimizes analysis of short-lived or transitional connection states.
ss state bigFilters for standard (large) sockets that are not transitional.
Concentrates audit on sustained, bidirectional communication streams.
ss -temoi -4 state establishedThe ultimate detailed view for established IPv4 TCP transport units.
Consolidates memory, timers, PIDs, and internal metrics in one snapshot.
ss -lntpZLists listening ports with PIDs and SELinux security contexts (-lntpZ).
Critical for auditing system security policy and mandatory access controls.
ss -p dst 1.1.1.1Identifies the local process communicating with a specific remote IP.
Essential for pinpointing which application is sending data to a suspect host.
ss -x src /tmp/.X11-unix/*Filters for Unix domain sockets matching a specific system path.
Audits local process communication related to the X11 graphics system.
ss -K dst 192.168.1.100Forcibly terminates all network connections to a specific remote host (-K).
Immediate mitigation tool for severing links to compromised or hostile IPs.
ss -K dport = :4444Forcibly kills connections on the specified suspicious port (-K).
Standard response tool for immediately severing reverse-shell communication links.
ss -tlp sport = :3306Verifies if a database process is listening on terminal port 3306.
Directly confirms availability and process-ownership of the MySQL service.
ss -at '( dport = :23 or sport = :23 )'Audits the system for active insecure Telnet communication flows.
Identifies legacy, plain-text administration sessions that should be secured.
ss -EContinuously monitors and displays new socket events in real-time (-E).
Ideal for detecting rapid port usage changes or malicious connection spikes.
ss -E grep tcpLive stream monitor for TCP socket creation and termination events.
Provides a scrolling terminal view of every new TCP handshake on the system.
ss -I eth0Filters output for sockets strictly bound to the 'eth0' network interface.
Isolates analysis to traffic traversing a single specific hardware adapter.
ss dev eth0Uses device-based filtering to show connections on adapter 'eth0'.
Alternate syntax for isolating network traffic by physical or virtual interface.
ss -t state established '( dport = :http or sport = :http )'Finds all active HTTP sessions, regardless of flow direction.
Identifies both hosted web services and outgoing web client connections.
ss -o state established '( dport = :ssh or sport = :ssh )'Checks SSH connections including timers for keepalive monitoring.
Identified sessions that are idle but maintained by protocol keepalive signals.
ss -4 state time-wait src 10.0.0.5Audits TIME-WAIT state IPv4 sockets on a specific interface address.
Diagnoses potential source port exhaustion issues for a particular IP.
ss -bShow socket-specific BPF (Berkeley Packet Filter) code (-b).
Reveals low-level packet processing logic and potential filtering bypasses.
ss -HSuppresses output header lines to facilitate automated parsing (-H).
Provides a clean, data-only stream for secondary script processing.
ss -H -t -nOutputs raw numeric TCP data without headers for downstream processing.
Optimized format for piped commands like grep, awk, or custom loggers.
ss -lntp | grep -v 127.0.0.1Identifies services exposed to the network by excluding localhost.
Provides a filtered view of the true external attack surface of the system.
ss -pluChecks for listening UDP services and their owning process names.
Exposes datagram-based entry points that may hide from standard TCP audits.
ss -pw -aChecks for all active raw sockets and their associated PIDs.
Identifies potential packet sniffers or unauthorized low-level protocols.
Shows network connections, listening ports, routing tables and interface statistics. Largely replaced by ss on Linux but still common everywhere.
The iproute2 tool for addresses, links, routes, neighbours and network namespaces — the modern replacement for ifconfig and route.
Reports a snapshot of running processes, with owners, resource usage and full command lines.
Measures maximum TCP and UDP throughput between two hosts — the standard tool for testing network bandwidth and link quality.