Units and state

Read unit state

Separate load, active, substate, and enablement before deciding what a service needs.

systemctl status packs several different facts into one screen. Most people glance at it and decide “running” or “broken”. I want you to read each fact on its own.

Let’s look at nginx:

systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Mon 2026-08-03 09:14:02 UTC; 3h 12min ago
   Main PID: 812 (nginx)
      Tasks: 3 (limit: 4573)
     Memory: 8.4M
     CGroup: /system.slice/nginx.service
             ├─812 "nginx: master process /usr/sbin/nginx"
             ├─813 "nginx: worker process"
             └─814 "nginx: worker process"

The four facts

Loaded tells you whether systemd found and parsed the unit file. It also shows the path it used. If this line says not-found or bad-setting, stop here. Nothing else matters until the file loads.

Active is the broad runtime state: active, inactive, failed, or activating.

The substate in parentheses adds detail. running means there is a live process. A Type=oneshot unit can show active (exited). It ran, finished with success, and stayed logically active. That is normal, not a bug.

Enablement is the enabled word on the Loaded line. It describes boot-time symlinks and nothing else. It does not prove the unit is running right now.

You can ask for the same four facts as plain properties. This is handy in scripts:

systemctl show --property=LoadState,ActiveState,SubState,UnitFileState nginx
LoadState=loaded
ActiveState=active
SubState=running
UnitFileState=enabled

The classic confusion

People mix up enablement and activity all the time. A service can be enabled but failed, because it crashed an hour ago. It can be disabled but active, because someone started it by hand. After the next reboot that hand-started service is gone, and you will wonder why.

So check both axes. systemctl is-active nginx answers “is it running now?”. systemctl is-enabled nginx answers “will it start at boot?”.

Both commands exit non-zero on a negative answer. That makes them useful in shell conditions:

systemctl is-active nginx && echo 'serving traffic'

My advice: never trust a single word from systemctl status. Read the Loaded line, then the Active line, then the substate, then the enablement. Four facts, four questions.

Try this on a server you manage. Pick one installed service and run the systemctl show command above. Explain each of the four values to yourself in one sentence. If you can do that, you already know what the service needs next: a fix, a start, an enable, or nothing at all.

Lesson completed

Take this course offline

Get every free book, course edition, and software download.

Get the download library →