This guide show how to boot Debian/Ubuntu in command line mode.

Step 1: Edit the GRUB Configuration File

  1. Open the GRUB configuration file.

    sudo vim /etc/default/grub
  2. Find the line that reads:

    GRUB_CMDLINE_LINUX=""
  3. Change it to:

    GRUB_CMDLINE_LINUX="text"

Step 2: Update GRUB and Set the Default Target to Multi-User (CLI)

sudo update-grub
sudo systemctl set-default multi-user.target

Step 3: Reboot

Now your system should boot into the CLI.

Back to GUI

If you decide to revert back to GUI, just change the line back to GRUB_CMDLINE_LINUX="", then run sudo update-grub and sudo systemctl set-default graphical.target to update the change.

Temporarily Switching to GUI

If you want to temporarily switch to the GUI without changing the default settings:

sudo init 5

This command will start the GUI for the current session only.

Outline