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 quickly switch between text mode and X environment in linux system

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article will explain in detail how the linux system can quickly switch between text mode and X environment. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Linux is not as good as redhat switching, but we can make our own script to quickly switch between the two environments. Let's take a look at the detailed tutorial.

1. In the linux desktop environment, press CTRL+ALT+T to open the terminal at the same time.

2. Then create a script file for myinit.sh.

3. Set executable permissions to myinit.sh.

4. Open myinit.sh with vim.

5. Enter the following:

If [$#! = 1]; then echo "myinit.sh 3-> used to deepin cmdline" echo "myinit.sh 5-> used to deepin X" exitfiif [[$1 = = 3]]; then sudo systemctl disable lightdmfiif [[$1 = = 5]]; then sudo systemctl disable lightdmfisudo shutdown-r now

6. If you want to enter the dde desktop environment in text mode, directly execute. / myinit.sh 5

7. If you are in dde desktop environment, you can also enter text mode.

. / myinit.sh 3

Privileges need to be elevated in the script, so you need to enter a password.

This is the end of the article on "how to quickly switch text mode and X environment in linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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