A runlevel defines the mode of operation of a Linux system—what services and processes are running. Think of it like "startup profiles" for the system

Runlevel Description
0 Halt (Shutdown the system)
1 Single-user mode (for maintenance)
2 Multi-user (without networking, varies)
3 Full multi-user mode (with networking)
4 Unused / Custom (depends on distro)
5 Multi-user mode with GUI (graphical mode)
6 Reboot the system

Check the default run level

  1. systemctl get-default

To change the run level in the linux you can use the command

  1. sudo systemctl isolate multi-user.target
  2. sudo systemctl set-default graphical.target

then reboot the server

if you want to switch without the reboot then you can used the command

  1. sudo systemctl isolate multi-user.target
  2. sudo systemctl isolate graphical.target