In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 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 to solve the problem of not starting desktop services when Centos starts. 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.
Centos does not start the desktop can enter the character CentOS interface by modifying the system runlevel.
Input
# init 3
View the runtime level
# runlevel
5 3
# # the current run level of the system is "5", and the last run level is "3". The transition to the run level is successful.
detailed description
The Linux system runs at a specified run level at any time, and the programs and services of different run levels are different, and the work to be done and the purpose to be achieved are different. Centos sets the runlevels shown in the following table, and the system can switch between these runlevels to do different things. Run level description
0 all processes will be terminated, the machine will stop in an orderly manner, and the system will be at this running level at the time of shutdown
1 single user mode. For system maintenance, only a few processes are running, and all services are not started
2 multi-user mode. Like runlevel 3, except that the Network File system (NFS) service is not started
3Multiuser mode. Allows multiple users to log on to the system, which is the default startup level of the system
4 user-defined run level
5 multi-user mode, and run X-Window after the system starts, giving a graphical login window
6 all processes are terminated and the system is restarted
1. If the system enters the character login CentOS interface after boot, the default run level of the system is 3; if the system enters the graphical login CentOS interface after startup, the default run level of the system is 5.
two。 If the user has already started the character CentOS interface, you can use the following command to enter the graphical CentOS interface:
$startx &
Run-level viewing and switching
Users can view the runlevel runlevel of the current system by using the following command. Users can switch the runlevel init [0123456Ss] with the following command, that is, follow the init command with a parameter, which is the runlevel code of the runlevel to which you want to switch, such as:
Use the init 0 command to switch to runlevel 0, that is, shutdown (never set initdefault to 0)
Use the init 1 command to switch to run level 1, that is, to enter single-user run mode
Use the init 6 command to switch to runlevel 6, that is, restart (never set initdefault to 6)
You can also use the te linit command, which is a symbolic link to the init command in CentOS.
Let's look at an example of using the runlevel and init commands:
# # display the current running level of the system
# runlevel
N 3
# # the current run level of the system is "3", and there is no last run level (represented by "N")
# init 2
# # after executing the "init 2" command, the corresponding stop and start service information will be displayed in the system console
# runlevel
3 2
# # the current runlevel of the system is "2", and the last runlevel is "3". The runlevel conversion is successful.
So change the run level of inidefault in / etc/inittab to 2 or 3 to turn off the desktop service.
This is the end of this article on "how to solve the problem of not starting desktop services when Centos starts". 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 out 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.