How to boot to console (text) mode with Debian/Ubuntu, Fedora, Arch Linux/Manjaro, etc.

This article describes how to temporarily or permanently boot Linux distributions such as Debian, Ubuntu, Fedora, Arch Linux / Manjaro, etc. in the console mode. The instructions in this article should apply to any Linux distribution using the following versions systematic (For the permanent mode below) and GNU GRUB (For temporary mode), but I personally only tried it on Debian, Ubuntu, Manjaro and Fedora.

Booting in console mode (text mode/tty) allows you to log in to the system from the command line (as a regular user or root user (if enabled)) without using a graphical user interface. This is useful if the system fails to boot when using graphical mode, or if the Linux running on your computer uses GUI and plugged in via ssh from time to time, so you can save some system resources by starting in text mode. But for whatever reason, this article will show you how to boot to the console/text/tty on Linux.

Situation A. Temporarily boot into console mode (text mode)

Following these instructions, your computer will boot to the console only when it is currently booted. After restarting the computer, it will start normally, so these changes are temporary1. To temporarily boot into console mode (tty), start the computer, and then press and hold immediately after the BIOS/UEFI startup screen Shift (BIOS), or press Esc Press the (UEFI) key repeatedly to access the GRUB menu. 2. After seeing the GNU GRUB screen, select the first item from the menu and press e key. This allows you to edit the kernel parameters before booting.
Find the line starting with linux (Use Up / Down / Left / Right Arrow keys for navigation); vmlinuz It should also be on the same line. At the end of this line (you can use the arrow keys to place the cursor at the beginning of the line and press End To move the cursor to the end of the line), and then add a space after the number 3. Don’t change anything else.
This one 3 Representative System goal It maps to the now obsolete old runlevels 2, 3, and 4 (used to start and stop service groups). For example, the old runlevel 5 Map to systemd And start using it… You have guessed the graphical (GUI) goal. For more information about system goals, see This pageExample 1 This is what the line starting with “linux” for Ubuntu 18.04 LTS looks like (not necessarily the same as you, but you have a good idea):

linux      /boot/vmlinuz-4.18.0-15-generic root=UUID=1438eb20-da3d-4880-bb3a-414e+++0a929 ro quiet splash $vt_handoff

This is to add ” 3 at the end:

linux      /boot/vmlinuz-4.18.0-15-generic root=UUID=1438eb20-da3d-4880-bb3a-414e+++0a929 ro quiet splash $vt_handoff 3

Example #2. This is how to find Fedora 31 from the line starting with “linux” (this is not the same for you, but you have a good idea):

linux ($root)/vmlinuz-5.3.13-300.fc31.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rhgb quiet

This is how it looks after adding 3 At the end of the line:

linux ($root)/vmlinuz-5.3.13-300.fc31.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rhgb quiet 3

3. When finished, press Ctrl + x Either F10 Boot into console (text) mode.
To reboot the system in console mode, use reboot command(sudo reboot).
It is worth noting that Linux distributions based on Debian and Ubuntu (including Linux Mint, Elementary OS, Pop!_OS, Zorin OS, etc.) have a built-in recovery mode in the GNU GRUB menu. Therefore, if you use Debian/Ubuntu or some Linux distributions based on it, follow the instructions above to enter the GNU GRUB menu, and then select Advanced options, And select the first entry ending in the new list that appears (recovery mode). Select this entry and click Enter Key, you will enter a menu that, among other things, allows you to enter the root shell prompt-after selecting this menu, the system will continue to boot to the command line instead of the graphical user interface, allowing you to use the root login password. This allows access to the file system in read-only mode. For reading and writing mount -o remount,rw /. For example, use this command to reset a lost user/administrator password on Ubuntu, Linux Mint, Elementary OS, etc.

Case B. Permanently boot into text mode (console mode)

Making your Linux system always boot into the console (text/tty) mode is as simple as running a single command:

sudo systemctl set-default

This command sets the text mode as the default systemd target (the run level that was called before systemd). After running this command, reboot the system and it will automatically boot into console/text mode every time.
Don’t know the current systemd target used on your system? Using this command, it will display the currently set target:

systemctl get-default

Extra tip: Using this technique, your Linux computer will boot to tty1 (plain text virtual console). You can switch to other virtual consoles with the following command Ctrl + Alt + F2 For tty2, Ctrl + Alt + F3 For tty3, and so on, until tty7. If you want to undo this change and make the Linux system boot into the default graphics mode, use:

sudo systemctl set-default

After using this command, restart (sudo reboot), and the system should start in graphical mode in the default mode. You might like: How to use Grub Customizer to change the GRUB boot order or default boot entry in Ubuntu, Linux Mint, Debian or Fedora