How to disable GUI on boot in Ubuntu 20.04
- The following command will disable GUI on boot hence upon the reboot the system will boot into multi user target:
- Reboot or log out from a current session to exit GUI:
- update and upgrade your machine.
- Install the Desktop Environment
- GNOME desktop:
sudo apt install ubuntu-desktop
- KDE Plasma desktop:
sudo apt install kde-plasma-desktop
- MATE desktop:
sudo apt install ubuntu-mate-core
- XFCE desktop:
sudo apt install xubuntu-core
- Install and Set Up a Display Manager
- Setting Up LightDM
sudo systemctl set-default multi-user
gnome-session-quit
# To enable it back do
sudo systemctl set-default graphical
sudo systemctl start gdm3
Enable GUI in Ubuntu
sudo apt update && apt upgrade
the best one is lightdm: sudo apt install lightdm
Choose LightDM using Spacebar and highlight <OK> using the Tab key. Finalize your choice and set LightDM as the default display manager by pressing Enter.
Now that the installation process is done, you need to enable the LightDM service. You can either use the service command or the systemctl command to do that.
Run this command to start the LightDM service with systemctl:
sudo systemctl enable lightdm
sudo systemctl start lightdm.service
Run this command to start the LightDM service using the service utility:
sudo service ligthdm start
Reboot your system with the reboot command. The next time your system boots up, you should be greeted by the LightDM greeter and a GUI desktop environment session upon successful login.