« Back to Systemd: Frequently Asked Questions

How to see all enabled services with systemctl

How to see all enabled services with systemctl?

Run systemctl with the 'list-unit-files' subcommand and provide a filter to only show enabled services.

systemctl list-unit-files --type=service --state=enabled

The systemctl command show active unit. To see only services that are enabled, we need to filter the output. This can be achieved using the list-unit-files subcommand and combined with the --state= option. As we are interested in enabled services only, set the value to enabled.

Want to parse the output with a script? Consider adding --legend=false to remove the header and footer text (X unit files listed.).

Usage

systemctl list-unit-files --type=service --state=enabled
UNIT FILE                              STATE   VENDOR PRESET
apparmor.service                       enabled enabled      
blk-availability.service               enabled enabled      
cloud-config.service                   enabled enabled      
cloud-final.service                    enabled enabled      
cloud-init-local.service               enabled enabled      
cloud-init.service                     enabled enabled      
console-setup.service                  enabled enabled      
cron.service                           enabled enabled      
dmesg.service                          enabled enabled      
e2scrub_reap.service                   enabled enabled      
finalrd.service                        enabled enabled      
getty@.service                         enabled enabled      
gpu-manager.service                    enabled enabled      
grub-common.service                    enabled enabled      
grub-initrd-fallback.service           enabled enabled      
irqbalance.service                     enabled enabled      
keyboard-setup.service                 enabled enabled      
lvm2-monitor.service                   enabled enabled      
lxd-agent.service                      enabled enabled      
ModemManager.service                   enabled enabled      
multipathd.service                     enabled enabled      
networkd-dispatcher.service            enabled enabled      
nginx.service                          enabled enabled      
open-iscsi.service                     enabled enabled      
open-vm-tools.service                  enabled enabled      
pollinate.service                      enabled enabled      
rsyslog.service                        enabled enabled      
secureboot-db.service                  enabled enabled      
setvtrgb.service                       enabled enabled      
snap.lxd.activate.service              enabled enabled      
snapd.apparmor.service                 enabled enabled      
snapd.autoimport.service               enabled enabled      
snapd.core-fixup.service               enabled enabled      
snapd.recovery-chooser-trigger.service enabled enabled      
snapd.seeded.service                   enabled enabled      
snapd.service                          enabled enabled      
snapd.system-shutdown.service          enabled enabled      
ssh.service                            enabled enabled      
systemd-networkd-wait-online.service   enabled disabled     
systemd-networkd.service               enabled enabled      
systemd-pstore.service                 enabled enabled      
systemd-resolved.service               enabled enabled      
systemd-timesyncd.service              enabled enabled      
thermald.service                       enabled enabled      
ua-reboot-cmds.service                 enabled enabled      
ubuntu-advantage.service               enabled enabled      
udisks2.service                        enabled enabled      
ufw.service                            enabled enabled      
unattended-upgrades.service            enabled enabled      
vgauth.service                         enabled enabled      

50 unit files listed.

Learn more about systemctl

This article uses the systemctl command to achieve its tasks. For this popular tool there is a cheat sheet available!

» Mastering the tool: systemctl

systemctl cheat sheet

Other questions related to Systemd

    Related articles

    Like to learn more? Here is a list of articles within the same category or having similar tags.

    Feedback

    Small picture of Michael Boelen

    This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

    Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

    Mastodon icon