Targets & Runlevels

Targets (the old runlevels)

Older init systems (SysVinit) organized boot states into numbered runlevels - a single number describing "what mode is the system in right now" (single-user maintenance mode, full multi-user with networking, graphical desktop, etc). systemd replaces this with targets: instead of one magic number, a target is simply a named unit that represents "a particular set of other units should be active." Reaching graphical.target, for example, means systemd has started everything that target depends on - which transitively includes multi-user.target's requirements too.

Runlevelsystemd targetMeaning
0poweroff.targetHalt
1rescue.targetSingle-user / rescue
3multi-user.targetMulti-user, text (servers)
5graphical.targetMulti-user + GUI
6reboot.targetReboot
CommandAction
systemctl get-defaultShow default target
systemctl set-default multi-user.targetSet default
systemctl isolate rescue.targetSwitch now

systemctl isolate is the live-switch command: it changes the running system's state immediately, stopping units not needed by the target you named and starting whatever the target requires - without a reboot. This is genuinely useful for admin work: systemctl isolate rescue.target drops you into a minimal single-user environment on a live server, for example to safely fix a filesystem that's normally in heavy use.

Tip: Servers almost always default to multi-user.target - full networking and services, but no graphical desktop, since nobody's sitting at the physical console. rescue.target is a step down from that: single-user mode with a login prompt, most services stopped, meant for repair work with minimal moving parts. emergency.target goes further still - it doesn't even mount most filesystems read-write, giving you the barest possible environment for situations where even rescue.target's assumptions (like a working root filesystem mount) might not hold.