Pcornel
Linux · Boot Process

Targets

Cheat sheet · https://pcornel.dk/topic.php?topic=2736

Back to the Topic

Answer

Boot targets decide what the system starts at boot: multi-user.target for servers, graphical.target for desktops, rescue.target and emergency.target for repair.

Remember

Set the default with systemctl set-default <target>; switch now with systemctl isolate <target>; boot once into a target with systemd.unit=<target> on the kernel command line.

First checks

  • systemd-analyze — boot time per stage
  • journalctl -b -p err — errors in this boot
  • journalctl --list-boots — previous boots
  • cat /proc/cmdline — kernel command line used

Commands

systemctl get-default
systemctl set-default <target>
systemctl isolate <target>
systemctl start <target>
systemctl restart app-stack.target

Verify in this order

default target set → reached at boot → units wanted by it 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=2736

Confirmation

Confirm action

Continue?