systemd targets & dependencies.
A unit. A dependency. A target. How those three concepts let systemd start a hundred services in the right order, in parallel where it can. Pace through the model and the boot graph. Maps to RH134 service-management objectives.
systemd targets and dependencies explained with animations. Units, Requires vs Wants vs After vs Before, target nesting, the boot graph, systemctl isolate, and default.target. Covers the RHCSA EX200 exam objectives on systemd service management.systemd is a graph engine. Every service is a node; every dependency is an edge. Targets are special nodes that bundle other nodes under a name. Booting is just "activate default.target and chase the edges".
- Β·Starting/stopping a service with systemctl
- Β·Reading basic Linux logs (journalctl)
- Β·What 'a process' is (PID, foreground/background)
Read a unit file, distinguish the four dependency directives, and use systemctl isolate to switch system state without rebooting.
pace: 10 minutes
A unit file β the building block
Everything systemd manages is called a 'unit'. The most common type is a service β like nginx or sshd β but there are also timers (scheduled tasks), sockets, mounts, and the 'target' units you'll meet in step 3. Every unit is described by a small text file in INI format with up to three sections: [Unit] for metadata + what it depends on, [Service] for how to run it, [Install] for what 'enabling' attaches it to.
$systemctl cat nginx.service$systemctl status nginx.service$systemctl show nginx.serviceA target isn't something that runs β it's a label for a state. The state is "all these units are active". That's why isolate works the way it does: it says "make this state the truth" and systemd brings up what's needed, stops what isn't.
$systemctl status UNIT$systemctl start / stop / restart UNIT$systemctl enable / disable UNIT$systemctl enable --now UNIT$systemctl mask UNIT$systemctl daemon-reload$systemctl cat UNIT$systemctl edit UNIT$systemctl list-units --type=service$systemctl list-units --failed$systemctl list-dependencies UNIT$systemctl get-default / set-default TARGET$systemctl isolate TARGET$journalctl -u UNIT$journalctl -u UNIT -f$systemd-analyze blameservice-a depends on service-b. If service-b fails to start, service-a should NOT start. Which directive do you use?
What's the difference between After= and Requires=?
You're on a GUI system. You want to drop to a text-only console without rebooting. Which command?
Your service is enabled but won't start at boot. Best first command?
These aren't graded β they're just for active recall, which is what actually makes the lesson stick.