Interview Prep/Linux/Boot Process & Kernel

What are systemd targets, and how do they map to old runlevels?

BeginnerConceptBoot Process & Kernel
Answer

In one line: A systemd target is a "system state" — a group of services that should be running. Targets replaced the old numbered runlevels.

Old runlevels and their targets:

Old runlevel systemd target What it means
0 poweroff.target Shut down
1 rescue.target Single-user repair mode
3 multi-user.target Normal server mode, no desktop
5 graphical.target Desktop with a graphical login
6 reboot.target Reboot

Example — check and change the target:

systemctl get-default                        # what the machine boots into
sudo systemctl set-default multi-user.target # boot into server mode from now on
sudo systemctl isolate rescue.target         # switch to rescue mode right now

Real-world note: almost every server runs in multi-user.target — no desktop, which saves memory and reduces security risk.

All Linux questions Roadmap: Linux

More on Boot Process & Kernel