Case #
You need to either set your Ubuntu Linux system to automatically start in CLI or GUI or you need to restore your operating system after a major fault which prevents you from logging on to the operating system after system boot.
Solution #
How to start Ubuntu Linux in CLI #
To start Ubuntu Linux in command line interface each time your system boots, run the following command.
sudo systemctl set-default multi-user
#After you initially login via CLI, if you need to later on launch the GDM display manager, run the below command.
sudo systemctl start gdm3

How to start Ubuntu Linux in GUI #
To start Ubuntu Linux in graphical window manager each time your system boots, run the following command.
Linux kernel uses various Linux window managers, display managers, desktop environments and display servers. For a Linux graphical user interface (GUI) components overview, refer to the following article: https://stefanos.cloud/kb/microsoft-teams-screen-sharing-not-working-in-linux/.
sudo systemctl set-default graphical

How to start Ubuntu Linux in recovery mode #
If you face any boot issues in Ubuntu Linux, such as black screen of death or other boot issues caused for example after an operating system upgrade, you can follow two alternative methods below to boot Linux into either GRUB mode or recovery mode.
- For GRUB mode, click the Esc button once after the end of your machine’s BIOS/UEFI screen.
- For recovery mode, click and keep pressed the Shift key after the end of your machine’s BIOS/UEFI screen. Choose your desired Linux kernel and make sure that you choose the (recovery mode) record. This will take you to a new failsafe installation of Linux in which you will be able to login as root user in CLI and resolve any operating system issues, as shown in the example screenshots below.

