systemctl list services: see what's running, failed or enabled

Updated November 15, 2026By HostCrust10 min read

Run systemctl list-units --type=service to list the services that are loaded and active right now. Add --state=running to see only running ones or --all to include stopped ones, and run systemctl --failed to see what has failed.

To see what starts at boot, run systemctl list-unit-files --type=service. Its STATE column says enabled, disabled, static or masked. “Running” and “enabled” are separate questions, so check both.

How do I list all services with systemctl?

Run systemctl list-units --type=service. By default it shows only units that are active, have a job pending, or have failed. Stopped services don't appear. On our Ubuntu 24.04 server it listed 62 services; here's part of the list:

$ systemctl list-units --type=service
  UNIT                                     LOAD   ACTIVE SUB     DESCRIPTION
  apparmor.service                         loaded active exited  Load AppArmor profiles
  cron.service                             loaded active running Regular background program processing daemon
  dbus.service                             loaded active running D-Bus System Message Bus
  nginx.service                            loaded active running A high performance web server and a reverse proxy server
  ssh.service                              loaded active running OpenBSD Secure Shell server
  systemd-journald.service                 loaded active running Journal Service
  ufw.service                              loaded active exited  Uncomplicated firewall
  unattended-upgrades.service              loaded active running Unattended Upgrades Shutdown
  ... (trimmed)

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

62 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Plain systemctl also runs list-units, but for every unit type (mounts, sockets, timers, devices). Other common questions have their own commands:

You want to knowCommand
Which services are running right nowsystemctl list-units --type=service --state=running
Every loaded service, including stopped onessystemctl list-units --type=service --all
Which services have failedsystemctl --failed (same as --state=failed)
Which services start at bootsystemctl list-unit-files --type=service --state=enabled
Which services are blocked from startingsystemctl list-unit-files --state=masked
Services matching a namesystemctl list-units 'ssh*' 'cron*'
Your own user's servicessystemctl --user list-units --type=service

Only running services:

$ systemctl list-units --type=service --state=running
  UNIT                        LOAD   ACTIVE SUB     DESCRIPTION
  cron.service                loaded active running Regular background program processing daemon
  dbus.service                loaded active running D-Bus System Message Bus
  fail2ban.service            loaded active running Fail2Ban Service
  nginx.service               loaded active running A high performance web server and a reverse proxy server
  rsyslog.service             loaded active running System Logging Service
  ssh.service                 loaded active running OpenBSD Secure Shell server
  systemd-journald.service    loaded active running Journal Service
  ... (list and legend trimmed)

29 loaded units listed.

For scripts, add --no-legend --plain --no-pager to get one unit per line, with no header, footer, bullets or pager.

What do LOAD, ACTIVE and SUB mean?

Each row answers three questions. systemctl --state=help prints every possible value; these are the ones you'll see most:

ColumnCommon valuesWhat it tells you
LOADloaded, not-found, masked, bad-settingWhether systemd could read the unit file. not-found means something refers to a unit that isn't installed.
ACTIVEactive, inactive, failed, activating, reloadingThe overall state. This is what systemctl is-active prints.
SUBrunning, exited, dead, auto-restartThe detail. running: a process is alive. exited: a one-shot job finished and the unit stays active. dead: stopped. auto-restart: it crashed and systemd is about to start it again.

With --all you also see inactive units, plus some marked with a bullet (●) and not-found:

$ systemctl list-units --type=service --all
  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
  certbot.service                          loaded    inactive dead    Certbot
  cron.service                             loaded    active   running Regular background program processing daemon
  ... (trimmed)

178 loaded units listed.

Those not-found lines are usually harmless. Ubuntu's ssh.service orders itself After=auditd.service, so systemd tracks that name even though auditd isn't installed. Worry only when a service you expect shows up as not-found: a typo or a missing package.

How do I see which services start at boot (enabled, disabled, masked)?

list-units shows what's running now. list-unit-files shows what's installed and whether it starts at boot:

$ systemctl list-unit-files --type=service
UNIT FILE                                    STATE           PRESET
apparmor.service                             enabled         enabled
apt-daily-upgrade.service                    static          -
apt-daily.service                            static          -
console-getty.service                        disabled        disabled
cron.service                                 enabled         enabled
cryptdisks.service                           masked          enabled
dbus.service                                 static          -
... (trimmed)

256 unit files listed.

STATE is what systemctl is-enabled would print. PRESET is the default that your distribution's preset policy asks for. When the two differ, something changed it after install: an admin, a package or a config tool. apt-daily.service and apt-daily-upgrade.service are static because their timers start them; our unattended-upgrades guide shows how to check that those timers are running.

STATEMeaningStarts at boot?
enabledLinked into a target such as multi-user.targetYes
disabledHas an [Install] section but isn't linkedNot on its own; a socket, timer or another unit can still start it
staticNo [Install] section; only other units start it (for example apt-daily.service, started by its timer)Only when something triggers it
maskedLinked to /dev/nullNo, and it can't be started at all
alias, indirect, generated, transientAnother name for a unit; enabled through another unit; created by a generator; created at runtimeDepends on the unit behind it

Enabled and running are independent. The systemctl manual says you can enable a unit without starting it, and start one without enabling it. Our server shows a case that confuses people:

$ systemctl is-active ssh ssh.socket
active
active
$ systemctl is-enabled ssh ssh.socket
disabled
enabled

SSH is running, yet ssh.service is “disabled”. On Ubuntu 24.04 the enabled unit is ssh.socket: it listens on port 22 and starts ssh.service on the first connection (systemctl status ssh shows TriggeredBy: ● ssh.socket). Nothing is broken, so check what triggers a disabled unit before you “fix” it.

The opposite case matters before a reboot: a service you started by hand but never enabled is running now and won't come back after the reboot. Our Linux reboot guide puts this is-enabled check on its list of things to confirm first.

To list only the masked units:

$ systemctl list-unit-files --state=masked
UNIT FILE                    STATE  PRESET
cryptdisks-early.service     masked enabled
cryptdisks.service           masked enabled
hwclock.service              masked enabled
multipath-tools-boot.service masked enabled
screen-cleanup.service       masked enabled
sudo.service                 masked enabled
x11-common.service           masked enabled

7 unit files listed.

Here the packages themselves ship these masks (links to /dev/null in /usr/lib/systemd/system/), mostly to switch off old init scripts. A masked database or security agent you didn't expect is worth asking about.

How do I list failed services?

systemctl --failed is the same as systemctl list-units --state=failed. Our Ubuntu server printed 0 loaded units listed., which is the answer you want. Our Debian 12 test VM (systemd 252, so the legend looks slightly different) had one:

$ systemctl --failed
  UNIT             LOAD   ACTIVE SUB    DESCRIPTION
● rc-local.service loaded failed failed /etc/rc.local Compatibility

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
$ systemctl is-system-running
degraded

A unit enters the failed state when its process exits with an error, is killed, or times out. It stays failed until it's started again or you run sudo systemctl reset-failed <unit>, so the list shows old failures as well as new ones. systemctl is-system-running sums it up in one word: running when nothing has failed, degraded when something has. That suits monitoring scripts.

To find out why a unit failed, read its log with journalctl -u rc-local -b. Here it said Failed to locate executable /etc/rc.local: Permission denied: the file exists but isn't executable. Our journalctl guide walks through reading a failure.

How do I check one service: status, is-active, is-enabled, show?

systemctl status (for people)

$ systemctl status cron --no-pager -n 3
● cron.service - Regular background program processing daemon
     Loaded: loaded (/usr/lib/systemd/system/cron.service; enabled; preset: enabled)
     Active: active (running) since Sat 2026-11-14 15:51:54 UTC; 41min ago
       Docs: man:cron(8)
   Main PID: 215777 (cron)
      Tasks: 1 (limit: 9430)
     Memory: 340.0K (peak: 2.2M)
        CPU: 51ms
     CGroup: /system.slice/cron.service
             └─215777 /usr/sbin/cron -f -P

Nov 14 16:25:01 web-01 CRON[255069]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Nov 14 16:25:01 web-01 CRON[255070]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Nov 14 16:25:01 web-01 CRON[255069]: pam_unix(cron:session): session closed for user root
  • Loaded: the unit file's path, whether it's enabled, and the preset.
  • Active: the state and when it entered that state. “since … 41min ago” on a server that booted hours earlier means the service was started or restarted after boot.
  • Main PID: the main process. For a stopped unit this line shows how it ended, such as (code=exited, status=0/SUCCESS).
  • The last lines are from the journal: 10 by default, or the number you pass with -n.

is-active, is-enabled, is-failed (for scripts)

These print one word and set an exit code, so they work in if statements. Add --quiet to print nothing.

Command (tested)PrintedExit code
systemctl is-active nginxactive0
systemctl is-active apt-daily.serviceinactive3
systemctl is-active nosuch.serviceinactive4 (no such unit)
systemctl is-failed nginxactive1 (not failed)
systemctl is-enabled nginxenabled0
systemctl is-enabled sudo.servicemasked1
systemctl is-enabled apt-daily.servicestatic0

Two traps: is-enabled also returns 0 for static, alias and indirect, so compare the printed word if you need “enabled” exactly. And is-active prints inactive for a unit that doesn't exist; only exit code 4 reveals the typo.

systemctl show (exact values)

status is for people; show prints properties as Name=value for scripts. Ask for the ones you need with -p:

$ systemctl show nginx -p ActiveState,SubState,MainPID,ActiveEnterTimestamp,NRestarts
MainPID=981
NRestarts=0
ActiveState=active
SubState=running
ActiveEnterTimestamp=Sat 2026-11-14 12:33:56 UTC
$ systemctl show -p NRestarts --value nginx
0

Properties come back in systemd's order, not yours. --value drops the name for use in shell variables.

systemctl start, stop, restart, reload, enable, disable: cheat sheet

All of these change the server and need sudo. They work the same on Ubuntu, Debian, AlmaLinux, Rocky Linux and RHEL, but unit names differ. Ubuntu's ssh.service and cron.service are sshd.service and crond.service on AlmaLinux 9, and Apache is apache2.service on Ubuntu and Debian but httpd.service on the RHEL family.

CommandRight nowAt next bootWatch out for
startStarts the unitNo changeDoesn't enable it
stopStops the unitNo changeAn enabled unit comes back after a reboot
restartStops, then startsNo changeAlso starts a unit that wasn't running
try-restartRestarts only if it's runningNo changeDoes nothing to a stopped unit
reloadAsks the service to re-read its own configNo changeFails if the unit has no reload command or isn't running
reload-or-restartReloads if supported, otherwise restartsNo changeStarts a stopped unit
enableNothing (add --now to start it too)StartsEnabling isn't starting
disableNothing (add --now to stop it too)Doesn't start on its ownA socket, timer or dependency can still start it
mask / unmaskBlocks / unblocks starting (mask --now also stops)Can't startLinks the unit to /dev/null

On a remote server, don't stop, disable or mask SSH or the network unless you can reach the provider's console. stop, disable --now or mask --now on ssh/sshd or the network service can cut you off, and so can restarting a firewall whose rules don't allow SSH. Stopping SSH usually leaves the session you're in open, but new connections fail. On Ubuntu 24.04, ssh.socket keeps listening and starts SSH again on the next connection. On our Debian 12 and AlmaLinux 9 VMs the SSH socket unit is disabled, so a stopped ssh.service or sshd.service stays down until someone starts it again.

Edited a unit file or drop-in (not the service's own config)? Run sudo systemctl daemon-reload before you restart, or the restart uses the old definition. Don't wait for a warning: on our Debian 12 VM, editing a loaded drop-in made systemctl status warn that it changed on disk, but a brand-new drop-in triggered no warning.

Reload or restart: which is safer on a live server?

Restart stops the process and starts a new one: new PID, new start time, and for most daemons, dropped connections. Reload runs the unit's ExecReload= command, usually a signal that tells the running process to re-read its config. For most daemons, the main process and its connections stay.

Not every unit can reload, and it varies by distribution. On our Ubuntu server cron can't, while on AlmaLinux 9 crond can. Check before you script it:

$ systemctl show -p CanReload nginx cron
CanReload=yes

CanReload=no
$ sudo systemctl reload cron
Failed to reload cron.service: Job type reload is not applicable for unit cron.service.

A reload also has a safety net that a restart lacks. nginx's documentation says a failed reload rolls back and keeps the old configuration. We tested what that means on a Debian 12 VM with nginx 1.22: we added a directive this version doesn't know (http2 on;), then tried a reload and a restart.

$ sudo nginx -t
2026/11/14 16:59:22 [emerg] 1776#1776: unknown directive "http2" in /etc/nginx/sites-enabled/default:23
nginx: configuration file /etc/nginx/nginx.conf test failed
$ sudo systemctl reload nginx
Job for nginx.service failed.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
$ systemctl is-active nginx; curl -s -o /dev/null -w '%{http_code}\n' http://localhost/
active
200
$ sudo systemctl restart nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
$ systemctl is-active nginx; curl -s -o /dev/null -w '%{http_code}\n' http://localhost/
failed
000

The failed reload changed nothing: same main PID, still serving pages. The restart stopped nginx first, then the unit's ExecStartPre= config test failed, and the site went down until we fixed the file. Our Ubuntu server's journal shows the same from a real mistake: a failed reload, and nginx still running on the old config.

So on a server:

  • Test the config first, whichever you use: sudo nginx -t, sudo sshd -t, sudo apachectl configtest.
  • Prefer reload for config changes when CanReload=yes. Restart for new binaries (after a package update) or when the service's docs say a setting needs it.
  • Don't use restart as “refresh if running”. It starts units that weren't running, which across a fleet can start services someone stopped on purpose. Use try-restart.
  • Reload on a stopped unit fails: nginx.service is not active, cannot reload.

The difference between restart and try-restart, tested on the Debian VM:

$ sudo systemctl stop cron
$ sudo systemctl try-restart cron; systemctl is-active cron
inactive
$ sudo systemctl restart cron; systemctl is-active cron
active

How do I check that a restart actually worked?

A restart that returns without an error isn't proof. For Type=simple services, systemd counts the unit as started as soon as the process is forked, so it can “start” and crash a second later. Check four things:

  1. Before: note the start time and PID with systemctl show -p ActiveEnterTimestamp,MainPID,NRestarts <unit>.
  2. After: systemctl is-active <unit> must print active, ActiveEnterTimestamp must be newer and MainPID different. If neither changed, no restart happened (a reload ran, or you restarted another unit).
  3. A minute later: check NRestarts again. If it went up, the service is crashing and systemd keeps restarting it.
  4. The function: request the page, open the port, or run the service's health check.

A restart of cron on the Debian VM, checked this way:

$ systemctl show cron -p ActiveEnterTimestamp,MainPID,NRestarts,InvocationID
MainPID=417
NRestarts=0
ActiveEnterTimestamp=Sat 2026-11-14 16:58:24 UTC
InvocationID=d9d7a7ab9e014d36a5d6792ef1f1f0de
$ sudo systemctl restart cron
$ systemctl is-active cron
active
$ systemctl show cron -p ActiveEnterTimestamp,MainPID,NRestarts,InvocationID
MainPID=1454
NRestarts=0
ActiveEnterTimestamp=Sat 2026-11-14 16:58:54 UTC
InvocationID=74e93759d325412c9bda2a2848c8640c

New PID, new start time, new invocation ID: it worked. NRestarts=0 is right as well. The counter only counts automatic restarts from the unit's Restart= setting, and a manual restart or reset-failed sets it back to zero.

Step 3 matters because is-active can say active while a service crashes over and over. We started a test unit that exits with an error after one second, with Restart=on-failure, and looked 14 seconds later:

$ sudo systemd-run --unit=crashloop-demo -p Restart=on-failure -p RestartSec=1 /bin/sh -c 'sleep 1; echo giving up >&2; exit 1'
Running as unit: crashloop-demo.service
$ systemctl show crashloop-demo -p ActiveState,SubState,NRestarts,Result
Result=success
NRestarts=6
ActiveState=active
SubState=running
$ journalctl -u crashloop-demo -o short-iso --no-pager
... (trimmed)
2026-11-14T16:59:59+0000 web-01 sh[1958]: giving up
2026-11-14T16:59:59+0000 web-01 systemd[1]: crashloop-demo.service: Main process exited, code=exited, status=1/FAILURE
2026-11-14T16:59:59+0000 web-01 systemd[1]: crashloop-demo.service: Failed with result 'exit-code'.
2026-11-14T17:00:00+0000 web-01 systemd[1]: crashloop-demo.service: Scheduled restart job, restart counter is at 6.

Caught between crashes, it looks healthy. Only NRestarts=6 and the journal tell the truth. When a unit restarts too fast, systemd gives up: its status shows Start request repeated too quickly and the unit stays failed. Fix the cause, run sudo systemctl reset-failed <unit>, then start it again.

To read only the logs from the current run, filter by the invocation ID, which systemd changes every time the unit starts:

journalctl _SYSTEMD_INVOCATION_ID=$(systemctl show -p InvocationID --value cron)

What is systemctl, and how is it different from systemd?

systemd is the service manager that runs as process 1 on Ubuntu, Debian, AlmaLinux, Rocky Linux and RHEL. It starts services, restarts them and, through systemd-journald, collects their logs. systemctl is the command you use to talk to it. It asks systemd to act rather than running services itself, which is why it fails in a typical Docker container, where systemd isn't process 1.

A unit is anything systemd manages: .service, .socket, .timer, .mount and more. A bare name means .service, so systemctl status nginx is nginx.service. Ubuntu's ssh.service also declares Alias=sshd.service, so both names work there.

How we checked this: On 14 Nov 2026 (UTC): an Ubuntu 24.04.5 LTS production server (systemd 255.4) with read-only commands only; a Debian 12.15 test VM (systemd 252.39), where we ran the restarts, the reloads, the broken nginx 1.22 config and the crash-looping test unit, then removed nginx and the test units; and an AlmaLinux test VM (systemd 252) for the RHEL-family unit names, at 9.6 and again, read-only, after its upgrade to 9.8 for the SSH units. Hostnames and one site file name are changed, and long lists are trimmed. Anything we didn't run ourselves comes from the official documentation listed under Sources.

Restart services with an approval step

HostCrust restarts only running or failed services, never critical ones like sshd, and only on servers that allow service restarts. By default an approver signs off first; then the agent on the server reports whether the unit is active again, and the result goes in a receipt. Free for up to 3 servers.

See how HostCrust works

Check which CVEs are really open on your server

HostCrust Patch Proof compares every installed package with your distribution's own security data. It counts fixes your distro backported and checks the kernel that is actually running, not just the one on disk. Read-only, no root, free.

Run the free check About Patch Proof

FAQ

How do I list only running services?

Run systemctl list-units --type=service --state=running. The --state filter takes any LOAD, ACTIVE or SUB value, so --state=exited or --state=inactive work too. Run systemctl --state=help to print every value your systemd version knows.

What's the difference between list-units and list-unit-files?

list-units shows what systemd has loaded in memory and its current state: running, exited, failed. list-unit-files shows every unit file installed on disk and whether it starts at boot: enabled, disabled, static or masked. A service can be in one list and not the other.

Why does a service show “active (exited)”?

It's a one-shot service that ran a command and finished successfully, such as ufw.service loading firewall rules. With RemainAfterExit=yes, systemd keeps it “active” after the process exits. Nothing is wrong, and there's no process to look for.

How do I exit systemctl status?

Press q. When the output is longer than your terminal, systemctl shows it in a pager (usually less). To skip the pager, add --no-pager, which is also what you want in scripts.

What does “State: degraded” mean?

At least one unit has failed. systemctl is-system-running prints running when everything is fine and degraded when the system works but one or more units failed. Run systemctl --failed to see which, fix or reset each one, and the state goes back to running.

Sources

  1. systemctl(1) manual page, systemd 255 (Ubuntu 24.04)
  2. systemd.service(5): Type=, Restart=, ExecReload= (Ubuntu 24.04)
  3. systemd.exec(5): $INVOCATION_ID (Ubuntu 24.04)
  4. org.freedesktop.systemd1(5): ActiveEnterTimestamp, MainPID and Result properties
  5. systemd commit that added the restart counter (NRestarts)
  6. systemd v255 source: the messages systemctl prints when a job fails
  7. nginx documentation: Controlling nginx (what a reload does)
  8. Red Hat Enterprise Linux 9: Managing systemd