Listing systemd services shows which daemons and helper units the service manager currently knows about, which ones are running now, and which ones are merely installed on disk. That quick inventory is useful after a package install, during boot troubleshooting, before editing dependencies, or when confirming the exact service name to inspect next.
The systemctl client exposes two complementary views. systemctl list-units –type=service asks the running manager for service units currently loaded in memory and reports their LOAD, ACTIVE, and SUB states. systemctl list-unit-files –type=service instead reads installed unit files and shows their enablement state, so the two commands answer different questions and often return different counts.
By default, list-units shows services that are active, failed, or have queued jobs, while --all expands the view to loaded but inactive services as well. That still does not equal every installed service on the system, so use list-unit-files when you need the broader inventory. Unit names can also vary by distribution, such as ssh.service versus sshd.service, and per-user services live under systemctl --user rather than the system manager.
$ systemctl list-units --type=service --no-pager UNIT LOAD ACTIVE SUB DESCRIPTION dbus.service loaded active running D-Bus System Message Bus getty@tty1.service loaded active running Getty on tty1 ldconfig.service loaded active exited Rebuild Dynamic Linker Cache systemd-binfmt.service loaded active exited Set Up Additional Binary Formats systemd-journal-catalog-update.service loaded active exited Rebuild Journal Catalog systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage systemd-journald.service loaded active running Journal Service systemd-logind.service loaded active running User Login Management systemd-modules-load.service loaded active exited Load Kernel Modules systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems ##### snipped ##### 19 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'.
The default view is not a full on-disk inventory. Upstream systemctl documents list-units as the in-memory view, so inactive services that are not currently loaded do not appear here.
$ systemctl list-units --type=service --state=running --no-pager --no-legend dbus.service loaded active running D-Bus System Message Bus getty@tty1.service loaded active running Getty on tty1 systemd-journald.service loaded active running Journal Service systemd-logind.service loaded active running User Login Management systemd-resolved.service loaded active running Network Name Resolution
Add --no-legend when the output is being copied into notes or fed to another command and you do not need the column legend.
$ systemctl list-units --type=service --all --no-pager UNIT LOAD ACTIVE SUB DESCRIPTION apt-daily-upgrade.service loaded inactive dead Daily apt upgrade and clean activities apt-daily.service loaded inactive dead Daily apt download activities ● auditd.service not-found inactive dead auditd.service dbus.service loaded active running D-Bus System Message Bus getty@tty1.service loaded active running Getty on tty1 ssh.service loaded inactive dead OpenBSD Secure Shell server ##### snipped #####
--all expands the in-memory view, but it still does not replace list-unit-files. Entries marked not-found usually indicate an alias or dependency that was referenced even though the backing unit file is not installed.
$ systemctl list-units --type=service 'systemd-*' --state=running --no-pager --no-legend systemd-journald.service loaded active running Journal Service systemd-logind.service loaded active running User Login Management systemd-resolved.service loaded active running Network Name Resolution
Quote glob patterns so the shell passes them to systemctl unchanged. Upstream also notes that list-units does not show uninstantiated templates such as foo@.service.
$ systemctl list-unit-files --type=service --no-pager UNIT FILE STATE PRESET apt-daily-upgrade.service static - apt-daily.service static - autovt@.service alias - console-getty.service enabled-runtime disabled dbus.service static - e2scrub_reap.service enabled enabled getty@.service enabled enabled networkd-dispatcher.service enabled enabled serial-getty@.service disabled enabled ssh.service disabled enabled ##### snipped #####
The STATE column shows the current installation state such as enabled, enabled-runtime, disabled, static, masked, or alias. PRESET shows the vendor preset policy, which may differ from the current state.
$ systemctl list-unit-files --type=service 'ssh*' --no-pager --no-legend ssh.service disabled enabled
list-unit-files can find installed templates and inactive services that do not appear in list-units. For per-user service inventories, use systemctl --user list-unit-files --type=service against the logged-in user's manager instead of the system-wide manager.