We can setup the server to boot either into graphical mode or non-graphical mode. Linux can run in multiple modes and these modes are set by something called runlevel
runlevel 5
The operation mode which provide a non-graphical mode is called runlevel 3
To see the operation mode run in the system. Run the command runlevel
from the terminal
$ runlevel
During boot, the init
process checks the runlevel
, it make sure that all programs need to get the system operation in that mode are started.
For example: The Graphical User
mode requires a display manager
service to run for the GUI to work, however this service is not required for the non-graphical mode
In the boot process section, we saw that the systemd
is used as the init
process in most new linux distributions suchs as Ubuntu 18.04
.
systemd
, runlevels are called as targets
.
graphical target
The Runlevel 3 is called as the multiuser target
To see the default target, run the command systemctl get-default
. This command looks at the file located at /etc/systemd/system/default.target
$ systemctl get-default
To change the default target, we can make use of systemctl set-target <desired target name goes here as an argument>
$ systemctl set-default multi-user.target