In this guide, you’ll learn how to view, set, and temporarily switch between different systemd targets on a Linux system. A systemd target defines which services and programs run (or remain inactive) at boot time—ranging from a full graphical desktop to a minimal emergency shell. Understanding these targets helps you optimize boot behavior for servers, desktops, or recovery scenarios.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Understand Common systemd Targets
| Target | Description | Typical Use Case |
|---|---|---|
| graphical.target | Full desktop environment with display manager | Workstations, desktops |
| multi-user.target | Text-mode login with networking and standard services | Servers, headless systems |
| rescue.target | Single-user mode with essential services | System maintenance, filesystem checks |
| emergency.target | Minimal shell on the root filesystem (read-only) | Critical repairs, root filesystem recovery |
2. Check the Current Default Target
To display your system’s default boot target:graphical.target means the system will start the graphical interface by default.
3. Change the Default Target
You can switch your default boot target to control which mode the system enters on every reboot.3.1 Set Default to Multi-User (Text Console)
4. Temporarily Switch Targets without Reboot
Use theisolate command to move into another target immediately—this does not alter your default target.
5. Rescue and Emergency Modes
For critical troubleshooting, systemd provides two minimal targets.5.1 rescue.target
Loads essential services and drops you to a root shell:5.2 emergency.target
Mounts only the root filesystem (read-only) and gives you a minimal shell:Both
rescue.target and emergency.target require a root password. Ensure root has a valid password before invoking these modes.6. Restore Graphical Desktop as Default
To return to booting into the graphical interface by default:Links and References
- systemd Targets Documentation
- Managing systemd Services
- Kubernetes Basics
- Linux Command Line Cheat Sheet