Set Debian/Ubuntu to Boot into CLI by Default
This guide shows how to boot Debian/Ubuntu in command line mode.
Step 1: Edit the GRUB Configuration File
Open the GRUB configuration file.
sudo vim /etc/default/grub
Find the line that reads:
GRUB_CMDLINE_LINUX=""
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.