Bob noticed something unusual with Dave’s laptop. “Dave, why is it that after the boot process your system goes directly to the Command Line Interface? Mine always loads up the graphical interface,” Bob asked. Dave explained, “That’s because I have specifically set up my system to boot into non-graphical mode.” In Linux, the system can operate in several modes, known as runlevels. You might be familiar with the graphical mode; however, runlevels allow for various operational modes beyond just the GUI. To determine the current runlevel of a Linux system, use theDocumentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
runlevel command. For example, on Dave’s laptop, the output is:


- Runlevel 5 corresponds to the graphical target.
- Runlevel 3 corresponds to the multi-user target.
If your system boots into a command line interface by default, it’s likely configured to use the multi-user target.
Changing the Default Target
To view the current default systemd target, execute the following command, which reads the file located at/etc/systemd/system/default.target:
default.target file is a symbolic link to the graphical.target unit file located in the /lib/systemd/system/ directory.
If you wish to change the default target, use the systemctl set-default command followed by your desired target. For instance, to switch from graphical mode (runlevel 5) to multi-user mode (runlevel 3), run:
After changing the default target, you may need to reboot your system for the changes to take effect.