Skip to main content
Welcome to this comprehensive guide on booting your Linux system into various operating modes using systemd. In this article, you’ll learn how to check the current default boot target, change it between graphical and multi-user (text-based) modes, and even switch targets without rebooting. This guide also covers specialized modes for troubleshooting, such as the emergency and rescue targets.

Checking the Default Boot Target

The default boot target determines which services and environments are loaded during system startup. To see the current default boot target, run the following command:
For example, the output might be:
This output indicates that your system is configured to boot into a graphical environment, which includes a graphical login prompt and desktop services.

Changing the Default Boot Target

Running a graphical session typically consumes more system resources. If you prefer a lighter, text-based mode (multi-user target) for regular operations, you can change the default boot target. The multi-user target loads essential services without initializing the graphical desktop, making it ideal for servers and environments where resource optimization is key. To change the default boot target to multi-user, execute:
After running this command, systemd removes the old default target and creates a symlink that points to the multi-user target. A typical output looks like:
In multi-user mode, you boot into a text-based interface where network services remain active, and multiple users can log in simultaneously.

Booting into the Multi-User Target

After setting multi-user as the default, a system reboot will present you with a text-based login prompt instead of a graphical interface. Log in with your username and password to access the command-line environment. An example session might look like:

Switching Targets Without Rebooting

Sometimes, you may need to temporarily switch the operating mode without rebooting your system. This can be useful if you require access to a graphical application while normally operating in multi-user mode. You can achieve this by using the systemd isolate directive. For instance, to temporarily switch from the multi-user target to the graphical target, run:
This command immediately transitions your system to the graphical login screen. Remember, this change is temporary; a reboot will revert your system to the default boot target (multi-user mode).

Overview of System Targets

Below is a table summarizing the available systemd targets discussed in this guide:

Special Modes for Troubleshooting

For system maintenance and troubleshooting, systemd offers specialized targets.

Emergency Target

The emergency target boots the system with minimal services and mounts the root filesystem as read-only. This mode is particularly useful when system instability prevents normal booting or when troubleshooting critical issues. To activate the emergency target:

Rescue Target

The rescue target starts the system with a slightly broader service set and provides you with a root shell. Use this mode to perform system repairs, create backups, or adjust configurations. To activate the rescue target:
Ensure that a root password is set before using the emergency or rescue targets; without a root password, you won’t be able to log in as root.

Restoring the Graphical Boot Target

If you decide to revert to a graphical boot interface, you can change the default target back to graphical mode with the following command:
Note: If you encounter an error such as “sudo: systemctl: command not found,” verify your system’s PATH settings or confirm that the systemd utilities are installed.
This guide has detailed the process of booting your Linux system into different operating modes with systemd. Continue to enhance your Linux administration skills and tailor the boot configurations to your system requirements through further practice and exploration. For more information on systemd and Linux boot processes, consider exploring additional resources:

Watch Video