After the CentOS system is booted, it usually does not start the desktop service. If you need to start it automatically, you can modify it by modifying the system running level. The following small series will be given to everyone. This section describes how to automatically start the desktop service when CentOS is powered on.
Enter
# init 3
View Run Level
# runlevel
5 3
# # The current running level of the system is ““5”, the last running level is “3””, and the conversion running level is successful.
Detailed Description
Linux systems run at a specified run level at any time, and the different runlevel programs and services are different, 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 accomplish different tasks. Run Level Description
0 All processes will be terminated, the machine will stop in an orderly manner, and the system will be at this run level when shutting down.
1 Single User Mode. For system maintenance, only a few processes are running, and all services are not started
2 Multi-user mode. Same as run level 3, except that the Network File System (NFS) service is not started
3 Multi-user mode. Allow multiple users to log in to the system, which is the default startup level of the system
4 Leave the user-defined runlevel
5 multi-user mode, and run X-Window after system startup, give A graphical login window
6 All processes are terminated, the system is restarted
1. If the system enters the character login CentOS interface after startup, the default running level of the system is 3; After the system starts, enter the graphical login CentOS interface, indicating that the system default running level is 5.
2. If the user has started the character CentOS interface, you can use the following command to enter the graphical CentOS interface:
$ startx &
Run level view and switch
Users can use the following commands to view the running level of the current system. Runlevel users can use the following command to switch the run level init [0123456Ss], which is followed by a parameter in the init command, which is the run level to be switched to. Run level code, such as:
Use the init 0 command to switch to run level 0, that is, shut down (do not set initdefault to 0)
Use the init 1 command to switch to run level 1. Go into single-user mode
Switch to runlevel 6 with the init 6 command, ie reboot (do not set initdefault to 6)
You can also use the te linit command in CentOS The te linit command is a symbolic link to the init command.
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 running level of the system is “3”, the last running level (represented by “N”)
# init 2
# # 执行“init 2&rdquo After the command, the corresponding stop start service information will be displayed in the system console.
# runlevel
3 2
# # The current running level of the system is already “2”, The last run level was “3”, the conversion run level was successful.
The above is the introduction of the method of automatically starting the desktop service when CentOS starts. If you want to close the desktop service, you can change the running level of inidefault in /etc/inittab to 2 or 3 to close the desktop. The service has started.
Linux system may not start properly due to NAS storage failure. In this case, you must start with Li
Although there are many softwares that can manage system programs, installation and uninstallation a
The files we download on the network or copied in the U disk are the same as the source files, but s
eCryptFS is a file encryption system in Linux system. It can encrypt files or direc
BackTrack5 uses the hard drive installation steps
How to identify Linux soft links and hard links
Linux uses shell batch conversion file encoding method
Linux using the example of the watch command
How to use the fuser tool on Linux
Linux prompts when you use Mkdir can not create directory ‘test’?
Linux version of the command to install BleachBit Daquan
How to disable the silent request of Firefox under Linux
How to use the sleep command on Linux
Linux how to carry out Alibaba Cloud server FTP configuration
Simple 8 steps to easily download the personalized font for the Windows 7 system installation
Vista's Ping tells you the IPv6 form of the local address.
How to open SNMP protocol 161 port under Win7 ghost pure version system
Win8 version of Ali Wangwang evaluation
Win10 preview version 10162 updated what
Using Win7's permission control function to set USB permissions
Call of Duty OL Weapons Gift Pack CDK Free Send
How to use the CD to repair the system detailed steps
Share the seven seven practical tips of Win 7 that you don't know
Win7 system using the command prompt prompt error 0x10df (4319) how to solve?