LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemctl-list-units

List loaded units and their states

TLDR

List active units
$ systemctl list-units
copy
List all units
$ systemctl list-units -a
copy
Filter by type
$ systemctl list-units -t [service|socket|timer]
copy
Filter by state
$ systemctl list-units --state [running|listening|dead]
copy
Filter by pattern
$ systemctl list-units '[pattern*]'
copy
Output without pager
$ systemctl list-units --no-pager
copy
Output without headers
$ systemctl list-units --no-legend
copy
List only failed units
$ systemctl list-units --failed
copy
List units with full names (no ellipsis)
$ systemctl list-units --full
copy

SYNOPSIS

systemctl list-units [OPTIONS] [PATTERN...]

DESCRIPTION

systemctl list-units displays units that systemd currently has loaded in memory. By default, it shows units that are active, have pending jobs, or have failed.The output shows the unit name, load state, active state, sub-state, and description. This is the primary command for viewing current system state.

PARAMETERS

-a, --all

Include inactive units and units following other units
-t, --type= TYPE
Filter by unit type (comma-separated list, e.g., service, socket, timer)
--state= STATE
Filter by LOAD, SUB, or ACTIVE state (comma-separated list)
--failed
Show only failed units (equivalent to --state=failed)
-l, --full
Do not ellipsize unit names, descriptions, or other fields in the output
-r, --recursive
Also show units of local containers
--with-dependencies
Show specified units and their dependencies
--no-pager
Disable pager output
--no-legend
Suppress header and footer (useful for scripts)

OUTPUT COLUMNS

UNIT - Unit nameLOAD - Load state (loaded, not-found, error)ACTIVE - Active state (active, inactive, failed)SUB - Sub-state (running, exited, dead, listening)DESCRIPTION - Unit description

CAVEATS

Only shows currently loaded units. Use `list-unit-files` to see all installed units. Failed units remain visible until acknowledged with `systemctl reset-failed`.

HISTORY

The list-units subcommand is the primary status overview command in systemd, replacing various init script listing mechanisms.

SEE ALSO

Copied to clipboard
Kai