LinuxCommandLibrary

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

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
-t, --type= TYPE
Filter by unit type
--state= STATE
Filter by state
--no-pager
Disable pager output
--no-legend
Suppress header and footer (for scripts)

OUTPUT COLUMNS

UNIT - Unit name
LOAD - 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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community