Getting started with Linux: Start Ubuntu or Debian and enter the command line

Source: Internet
Author: User

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.

  1. $ 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 = "":

  1. 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.

  1. $ 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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.