How to start Ubuntu Linux in CLI, GUI and recovery mode

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:

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.

If you are running the Linux Ubuntu installer, the repetitive press of the Shift key may bring a list of advanced options via the F6 key. The F6 key allows for some extra GRUB parameters to be passed during initial boot, to resolve a series of compatibility issues related to software or hardware. The following flags can be used to alleviate old legacy hardware compatibility issues.

  • acpi=off
  • noapic
  • nolapic (Disable local version of APIC)

The above flags disable the APIC (Advanced Programmable Interrupt Controller). The APIC controller can be configured to generate and handle operating system interrupt signals. Some implementations of APIC can have compatibility issues on legacy systems so in these cases APIC should be disabled.

Powered by BetterDocs