systemd Service State and Enablement
One objective, and the single most expensive misunderstanding available: start and enable are unrelated. A service can be running and disabled, stopped and enabled, or masked so it cannot start at all. All four states are produced here, because the grader reboots the machine before marking.
Operating Running Systems Guide 30 of 67 Beginner
- OSRHEL 10.0
- Kernel6.12.0-55.9.1.el10_0
- dnf4.20.0
- Flatpak1.16.0
- TimeAbout 14 min
systemctl enable --now does both in one command and is the form to default to. disable --now is its counterpart. Neither existed in early systemd, which is why older material tells you to run two commands.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RHCSA-A01 | 192.168.0.31 | RHEL 10.0 | Practice node (graded) - spare /dev/sda | 2 Core | 4 GB | 50 GB + 15 GB |
This guide includes
Use this for the single most expensive misunderstanding available on this exam. This matters because started and enabled are different states - a service can be running now and gone after a reboot, and the exam grades the finished machine.
- reading the state of a unit
- finding that started is not the same as enabled
- using the one command that does both at once
- separating restart from reload
- masking a unit, and finding units and failures
Before you start
- A sudo-capable account and a working repository.
- The session installs
httpdpurely as something safe to start and stop, then removes it.
-
The state of a unit
-
Started is not enabled
-
The one command that does both
-
restart, reload, and the difference
-
Masking
-
Finding units and failures