Boot Targets Explained
Boot targets are systemd's replacement for the old SysVinit runlevels. A target is a named synchronization point — a group of units that must be active before the system is considered to have reached that state. When Ubuntu boots, it activates the default target, which pulls in all the services and dependencies needed for that mode of operation.
What are boot targets?
SysVinit runlevel → systemd target equivalent
1 (single user) → rescue.target
3 (multi-user) → multi-user.target
5 (GUI) → graphical.target
6 (reboot) → reboot.target
0 (halt) → poweroff.target
Boot sequence (simplified):
firmware → bootloader → kernel → initrd → sysinit.target
→ basic.target → network.target → multi-user.target (or graphical.target)Common targets and what they do
| Target | Description | Services started |
|---|---|---|
| poweroff.target | System shutdown | All stopped |
| rescue.target | Single user, minimal services | Root shell only, no networking |
| emergency.target | Bare minimum (even less than rescue) | Root shell, read-only filesystem |
| multi-user.target | Normal server operation | All services, networking, no GUI |
| graphical.target | Desktop GUI | multi-user.target + display manager |
| reboot.target | System reboot | All stopped then restarted |
| network.target | Network configured | Network interfaces up |
| network-online.target | Network fully operational | DNS resolving, routes ready |
# Check current default target
systemctl get-default
# Check currently active target
systemctl list-units --type=target --state=active
Ubuntu server default
multi-user.target
Changing the default boot target
# Set default boot target
sudo systemctl set-default multi-user.target # Server (no GUI) — default on Ubuntu Server
sudo systemctl set-default graphical.target # Desktop — default on Ubuntu Desktop
# Verify the change
systemctl get-default
# What this does: creates a symlink
ls -la /etc/systemd/system/default.target
Output
/etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target
Booting into rescue or emergency mode
# Via GRUB (when system won't boot normally):
# 1. At GRUB menu: press E to edit the boot entry
# 2. Find the line starting with "linux"
# 3. Append: systemd.unit=rescue.target (or emergency.target)
# 4. Press Ctrl+X to boot
# rescue.target: single-user mode with root filesystem writable
# Use when: forgot root password, service causing boot failure
# Gives: root shell, local filesystems mounted read-write
# emergency.target: even more minimal than rescue
# Root filesystem mounted READ-ONLY
# Use when: filesystem corruption, cannot mount filesystems
# Gives: root shell, need to manually mount things
⚠️ WARNING: In
rescue.target, networking is not available and no multi-user services are running. Other users cannot log in. If this is a production server accessed remotely, booting to rescue mode means you lose SSH access — you will need console access (IPMI, iLO, iDRAC, or cloud console) to work in rescue mode.
Switching targets at runtime
# Switch to a different target without rebooting
sudo systemctl isolate multi-user.target # Go to multi-user (stops GUI if running)
sudo systemctl isolate rescue.target # Go to single user (stops everything!)
# Simpler commands for common operations
sudo systemctl reboot # Equivalent to: isolate reboot.target
sudo systemctl poweroff # Equivalent to: isolate poweroff.target
sudo systemctl halt # Stop CPU but don't cut power
sudo systemctl suspend # System sleep
# For maintenance: drop to rescue mode then come back
sudo systemctl isolate rescue.target
# ... do maintenance ...
sudo systemctl default # Return to default target
Conclusion
Ubuntu servers use multi-user.target as the default, which activates all network services without a GUI. Know how to boot into rescue.target via GRUB for emergency situations — it gives you a root shell with read-write filesystems when the system cannot boot normally. The practical daily use of targets is via systemctl reboot, systemctl poweroff, and verifying that your custom services have WantedBy=multi-user.target in their [Install] section so they activate at the right point in the boot sequence.
FAQ
Why should administrators understand Boot Targets Explained?+
Because this topic affects planning decisions, server lifecycle, compatibility, support expectations, or how you reason about Ubuntu systems before making operational changes.
Do I need a lab for this topic?+
A lab is useful for checking commands and seeing the concept on a real Ubuntu machine, but the main value is understanding the decision, tradeoff, or system behavior clearly.
How should I use this knowledge in production?+
Use it to make better choices, document why those choices were made, and avoid rushed changes that ignore support windows, compatibility, stability, or operational risk.
Need help with Ubuntu administration?
Work directly with Muhammad Irfan Aslam for Ubuntu Server, Linux, cloud, Docker, DevOps, CI/CD, or infrastructure troubleshooting support.
Hire Me for Support