Boot systems into different targets manually – RHCSA Objective Preparation

In this part of RHCSA exam preparation you will learn how to manually change into a different boot targets. This article will also teach you how to set a default boot targets to automatically boot into graphical or multi-user target on Red Hat Enterprise Linux system.

In this tutorial you will learn:

  • How to check default boot target
  • How to manually switch between different targets
  • How to set default boot to multi-user target
  • How to set default boot to graphical target

Change default runlevel target on RHEL 8 system

Change the default runlevel target on RHEL 8 system.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Red Hat Enterprise Linux 8
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

What are runlevel targets

You can think of boot target as specific level of operation. So for example if you prefer to use Graphical user interface ( given that GUI is installed ) you may want to change the level of operation to Similarly, for non-graphical multi-user operational level you will need to change to

If you are familiar with SysV which was the default initialization standard for many GNU/Linux systems prior to the systemd proliferation you might recall the graphical target as runlevel 5 or multi-user target as runlevel 4. In fact not much has changed and the runlevel nomenclature still exist. Using the following command you can list all runlevel targets available on your RHEL system:

# ls -l /lib/systemd/system/runlevel*.target

For all possible targets use:

# systemctl list-units --type target
# systemctl list-units --type target --all

To following table lists all available run levels of operation of the Red Hat Enterprise Linux 8 system.
Runlevel Target Unit Target Unit Description
0 or Changing your system to runlevel 0 will shutdown the system and power off your server/desktop.
1 or Also known as single mode the rescue runlevel is use for system troubleshooting and various system administration tasks.
2 or User defined runlevel. By default, identical to runlevel 3.
3 or This is a multi-user and non-graphical runlevel. Multiple users can log in via local consoles/terminals or remote network access.
4 or User defined runlevel. By default, identical to runlevel 3.
5 or Multi-user graphical runlevel. Multiple users can log in via local consoles/terminals or remote network access.
6 or Changing your system to this runlevel will reboot your system.
On your RHCSA exam when you get stuck or simply cannot remember some of the above terminology regarding the runlevels consult the manual page by executing man runlevel command.

How to check and change default boot target

First, we will learn how to check a currently configured default runlevel boot target. Once done, we will set a default runlevel target of our system to runlevel 3 that is to the target unit. Setting a default runlevel target will instruct your system to automatically boot into a pre-configured runlevel.

  1. Check a default runlevel system configuration:
    # systemctl get-default
    # ls -l /etc/systemd/system/

    The above command will output a name of currently set default runlevel target unit.

  2. Set default runlevel target unit to target unit. This will configure your system to boot into runlevel3 the next time you reboot your system.
    # systemctl set-default
    Removed /etc/systemd/system/
    Created symlink /etc/systemd/system/ → /usr/lib/systemd/system/
    You can refer to single target units via different names. For example, for your RHCSA exam you may find it easier to remember runlevel3 instead of Not only it is easier to remember but also it is faster to type, hence saving you some time on your exam. For example the following four commands are completely identical. The best command to use is the one you remember the easiest:

    # systemctl set-default
    # systemctl set-default multi-user
    # systemctl set-default
    # systemctl set-default runlevel3

    To better understand what is going on here you should first review the Create hard and soft links RHCSA objective. Once ready note that targets such as for example the is simply a symbolic link of the unit.

    List all available boot targets on RHEL system

    List all available boot targets on RHEL system.

  3. Reboot your system:
    # reboot

How to change manually into a different runlevel target

The above section, explained how to change a default runlevel. This means that the next time the system is rebooted it will boot into a user selected runlevel. Next, we will learn how to change runlevel on-fly without a need for reboot. This can be accomplished by the use of the systemctl command with a combination of isolate argument.

In the below example we will temporarily change from the graphical runlevel to multi-user target.

  1. Change to multi-user runlevel:
    # systemctl isolate multi-user

    The above a command simply disabled the graphical runlevel and corresponding services.

  2. If you cannot see login prompt you might need to change to a different TTY console by using the combination of CTRT+ALT+F1 keys.


  1. Reboot your system by manually switching to using the systemctl command. Can you also use runlevel target shutdown and power off your system?
  2. Set your system to boot directly to multi-user target. Reboot your system and confirm that the system persistently boots into multi-user target.
  3. Try to switch repeatedly between the multi-user runlevel and graphical runlevel. Why you cannot see the login prompt directly when switching from the graphical to multi-user runlevel?
  4. This is an extra curriculum question for good students and those who are not afraid of little hassle and self research.
    While working on the question 4 you might end up with a broken system. Hence proceed only on non-production system such as sandbox virtual machines etc.

    Again, do not attempt this question if you are not ready to possibly break your system! Set your default boot target to unit and reboot your system. Can you fix the constant reboots and set your default runlevel back to say runlevel5?