Skip to content

Click on each book below to review & buy on Amazon.

As an Amazon Associate, I earn from qualifying purchases.

RHCSA - Deploy, Configure, & Maintain Systems: Configure Systems to Boot Into a Specific Target Automatically

Ensure that for production systems you always communicate with any stakeholders before booting into different targets.


In systemd-based Linux distributions, targets represent specific system states or sets of services that can be activated or deactivated to manage the system's behavior during boot and runtime.

Below is a table of the typical targets you can boot into:

Target Description The default target that is reached after the system has finished booting. It typically starts the system in the default runlevel. This target is used in emergency situations where the system is in an unusable state. It provides a minimal environment for recovery tasks. This target is used to start the system with a graphical user interface (GUI) environment, such as X11 or Wayland. This target is used to start the system with a multi-user environment, without a GUI. It provides a text-based login prompt. This target is similar to the, but it provides a more complete environment for performing system recovery tasks.

The is used during a normal boot of the system.

Determine the Default Target

The is determined by a link that points to the actual target that should be booted into.

Display where the links to:

ls -l /etc/systemd/system/

If unchanged since since setting up your system for this course, the ls output should show similar to the following:

lrwxrwxrwx. 1 root root 40 Jun 22 07:50 /etc/systemd/system/ -> /usr/lib/systemd/system/

There is an easier way to find out what the is though, which is by using the systemctl get-default command.

Determine the systems

systemctl get-default

List Available Targets to Boot into

You can list available targets on your system using the systemctl list-units --type=target command, however this will list all targets and not just the ones that can be isolated. The AllowIsolate=yes setting in the targets unit file determines if the target can be isolated or booted into.

List all targets:

systemctl list-units --type=target

This command will show a list of targets along with their current state.

Locate all targets that can be isolated:

grep -E 'AllowIsolate=(yes|'yes'|"yes")' /usr/lib/systemd/system/*.target

This command will search all target files in the /usr/lib/systemd/system directory that have AllowIsolate set to yes.

Changing the Default Target

To change the to point to the preferred environment to start in during a normal boot, you use the systemctl set-default command.

Change the to point to the

If your default was already the then you can use the to practice instead.

If you do use the, ensure you know the root password, otherwise you will have to follow Interrupt the Boot Process in Order to Gain Access to a System in order to login.

sudo systemctl set-default

The output of this command will show the symlink being updated to point to the chosen target:

Removed "/etc/systemd/system/".
Created symlink /etc/systemd/system/ -> /usr/lib/systemd/system/

Reboot into Default Target

You will want to ensure that following a reboot, the system boots into your chosen target, especially if this was one of the tasks set on your exam.

Reboot system and check you are in the correct target:

sudo reboot

This command will initiate a system reboot, and upon startup, the system will automatically boot into the

Revert the Default Target Change

To leave your system booting to your normal target you use, run the systemctl set-default command again and reboot.

Revert to previously used target:

Replace graphical with your usual target, for example multi-user if that was what yours was before:

sudo systemctl set-default
sudo reboot

Support DTV Linux

Click on each book below to review & buy on Amazon. As an Amazon Associate, I earn from qualifying purchases.

NordVPN ®: Elevate your online privacy and security. Grab our Special Offer to safeguard your data on public Wi-Fi and secure your devices. I may earn a commission on purchases made through this link.