Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to enter the command line interface after the Debian or Ubuntu system starts

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to enter the command line interface after Debian or Ubuntu system startup". In daily operation, I believe many people have doubts about how to enter the command line interface after Debian or Ubuntu system startup. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to achieve Debian or Ubuntu system startup to enter the command line interface". Next, please follow the editor to study!

The Linux desktop comes with a display manager (such as GDM, KDM, LightDM) that allows the computer to automatically enter a GUI-based login environment. However, what if you want to boot directly into the terminal? For example, you are troubleshooting desktop-related problems or want to run an application that does not require GUI.

Note that although you can temporarily switch from desktop GUI to virtual terminal by pressing Ctrl+Alt+F1 to F6. In this case, however, your desktop GUI is still running in the background, which is different from starting in plain text mode.

On the Ubuntu or Debian desktop, you can start text mode at startup by passing the appropriate kernel parameters.

Start temporary access to the command line

If you want to disable desktop GUI and temporarily enter text mode, you can use the GRUB menu.

First, turn on your computer. When you see the initial GRUB menu, press'e'.

Then move on to the next screen, where you can modify the kernel boot options. Scroll down to the line that starts with "linux", and here is the list of kernel parameters. Delete "quiet" and "splash" from the parameter list. Add "text" to the parameter list.

The upgraded list of kernel options looks like this. Press Ctrl+x to continue to start. This will launch the console once in verbose mode (LCTT translation: since the changes are not saved, the next restart will enter GUI).

Permanently start to enter the command line

If you want to permanently boot into the command line, you need to update the GRUB setting that defines the kernel startup parameter.

Open the default GRUB profile in a text editor.

The code is as follows:

$sudo vi / etc/default/grub

Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT and comment it with "#". This disables the splash screen and starts the detailed mode (that is, shows the detailed startup process).

Change the GRUBCMDLINELINUX= "" to:

The code is as follows:

GRUB_CMDLINE_LINUX= "text"

Next, uncomment "# GRUB_TERMINAL=console".

The updated GRUB configuration looks like this.

Finally, use the update-grub command to regenerate the GRUB2 configuration file under / boot based on these changes.

The code is as follows:

$sudo update-grub

At this point, your desktop should be able to switch from GUI startup to console startup. It can be verified by reboot.

At this point, the study on "how to enter the command line interface after the Debian or Ubuntu system starts" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report