Getting started with Linux: Start Ubuntu or Debian and enter the command line
Q: I am running Ubuntu Desktop, but I want to temporarily enter the command line after startup. Is there any easy way to start the terminal?
The Linux Desktop comes with a display Manager (for example, the Display Manager (for example, the Display Manager, KDM, and LightDM), which can enable the computer to automatically enter a GUI-based logon environment. However, what if you want to start the terminal directly? For example, you are troubleshooting desktop problems or want to run an application that does not require a GUI.
Note that you can temporarily switch from the desktop GUI to the virtual terminal by pressing Ctrl + Alt + F1 to F6. However, in this case, your desktop GUI is still running in the background, which is different from that started in plain text mode.
In Ubuntu or Debian desktop, you can start the text mode at startup by passing appropriate kernel parameters.
Start temporary access to the command line
If you want to disable the desktop GUI and temporarily enter the text mode, you can use the GRUB menu.
First, open your computer. When you see the initial GRUB menu, press 'E '.
Next, go to the next screen. Here you can modify the kernel startup options. Scroll down to the line starting with "linux". Here is the list of kernel parameters. Delete "quiet" and "splash" in the parameter list ". Add "text" to the parameter list ".
The list of upgraded kernel options looks like this. Press Ctrl + x to start the instance. This will start the console once in detail mode ).
Start permanently to enter the command line
If you want to permanently start the instance and enter the command line, you need to update and define the GRUB settings of the kernel startup parameter.
Open the default GRUB configuration file in the text editor.
- $ Sudo vi/etc/default/grub
Search_The line starting with LINUX_DEFAULT and comments it. This will disable the initial screen and start the detailed mode (that is, the detailed startup process is displayed ).
Change GRUBCMDLINELINUX = "":
- GRUB_CMDLINE_LINUX = "text"
Next, cancel the comment "# GRUB_TERMINAL = console.
The updated GRUB configuration looks like the following.
Finally, use the update-grub command to regenerate the GRUB2 configuration file under/boot Based on these changes.
- $ Sudo update-grub
At this time, you should be able to switch from GUI startup to console startup. It can be verified by restarting.
This article permanently updates the link address: