Runlevels
Cheat sheet · https://pcornel.dk/topic.php?topic=2735
Answer
Runlevels are the SysV-init way of describing system states (0 halt, 1 single-user, 3 multi-user, 5 graphical, 6 reboot). systemd maps them to targets (runlevel3.target = multi-user.target).
Remember
Use targets on modern systems: systemctl isolate multi-user.target instead of init 3, systemctl set-default instead of editing /etc/inittab. runlevel still reports the equivalent.
First checks
systemd-analyze— boot time per stagejournalctl -b -p err— errors in this bootjournalctl --list-boots— previous bootscat /proc/cmdline— kernel command line used
Commands
systemctl get-defaultsystemctl list-units --type=targetsystemctl isolate multi-user.targetsystemctl set-default multi-user.targetsystemctl enable <svc>systemctl restart <svc>
Verify in this order
runlevel number → mapped to a systemd target → target units started
Where it usually breaks
First mismatch in persistent unit/config/generator → dependency/order graph → systemd state → process/cgroup → socket/resource dependency → journal → consumer check; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2735