Configuring Default Boot Targets in Linux and switching between Text Based and Graphical Modes

Опубликовано: 04 Февраль 2026
на канале: Kingsley Atuba
453
1

In this project, the goal is to understand how to configure the default boot target using systemd on a Linux computer. The default boot target determines what mode or runlevel the system should start in when it boots up. Different targets represent different system configurations, such as a text-based multi-user mode or a graphical desktop mode.


Real-life Significance

In a real-life scenario, this process is useful for system administrators who want to configure the start-up behaviour of a Linux system. For example, they might want a server to boot into a text-based mode for better performance and resource utilization, or they might want a desktop computer to boot into a graphical mode for a user-friendly experience.


Project steps with codes

Initially, the default target is set to "multi-user.target," which typically represents a text-based mode.

You can confirm by running

systemctl get-default

To change the default target to "graphical.target" use the command

sudo systemctl set-default graphical.target

Verify the change by running

systemctl get-default

which should return "graphical.target" to confirm that the default boot target has been updated to a graphical mode.
So, the goal of this project is to configure the system to boot into a graphical mode, not a text-based mode.

If you want to change the default boot target back to a text-based mode (e.g., multi-user.target) after you've configured it for a graphical mode, you can follow these steps:

Open a terminal on your Linux system.

To check the current default target, use the command:

codesystemctl get-default.

This command will display the current default target, which is likely "graphical.target" if you've previously set it to boot into a graphical mode.

To change the default target back to a text-based mode (e.g., multi-user.target), use the following command with sudo:

sudo systemctl set-default multi-user.target

This command sets the default target to "multi-user.target," which represents a text-based multi-user mode.

To verify that the change was successful, run

systemctl get-default

again. It should now return "multi-user.target" to confirm that the default boot target has been updated to a text-based mode.

After following these steps, your Linux system will be configured to boot into a text-based mode the next time it starts up.

Dont forget to turn of your virtual machine to avoid unneccessary charges.