systemctl-list-sockets
List socket-activated units
TLDR
List active socket units
SYNOPSIS
systemctl list-sockets [OPTIONS] [PATTERN...]
DESCRIPTION
systemctl list-sockets displays socket units currently active in memory, ordered by listening address. Socket units implement socket activation, where services are started on-demand when connections arrive.
The output shows the listening address (IP:port, path, etc.), the socket unit name, and the unit it activates.
PARAMETERS
-a, --all
Include inactive and failed socket units--state= STATE
Filter by state--show-types
Display socket types (Stream, Datagram, etc.)--no-legend
Suppress header and footer--no-pager
Disable pager
CAVEATS
Shows systemd-managed sockets only, not all listening sockets on the system. Use `ss` or `netstat` for a complete list. Socket activation may cause startup delays on first connection.
HISTORY
The list-sockets subcommand provides insight into systemd's socket activation infrastructure, which reduces memory usage by starting services only when needed.
SEE ALSO
systemctl-list-units(1), systemd.socket(5), ss(8)
