Article Title: Understand the Runlevel during Linux Startup. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The Linux operating system has to go through several different stages from the start to the completion of the start. These stages are called runlevel. Similarly, when the linux operating system is shut down, it has to go through several different runlevels, next we will prepare to introduce runlevel in detail, and show you some tips to avoid unnecessary restart of the linux system.
Runlevel can be regarded as the system status and image. You can think of runlevel as Normal, safemode, and Command prompt only in Microsoft windows. To access each runlevel, you need to start or close a series of services. These services are stored in the/etc/rc. d/rc? directory as initialization scripts ?. D/or/etc/rc ?. Under d (? Indicates the serial number of runlevel ).
In most linux releases, there are usually eight runlevels
Runlevel System State
0 Halt the system
1 Single user mode
2 Basic multi user mode
3 Multi user mode
5 Multi user mode with GUI
6 Reboot the system
S, s Single user mode
In most Desktop linux systems, the default runlevel is 5, while in most server versions, the default runlevel is 3, and in most server versions, the default runlevel is 3, runlevel 1 and 2 are rarely used in addition to debugging. runlevel s and S are not directly used by users, but used to prepare for Single user mode.
The linux operating mode has the following advantages over the windows Startup Mode: You can use it when the system is idle. the init tool switches the runlevel you are currently using. In addition, when you shut down or start the linux system, you can switch your runlevel without knowing it. The system shutdown process needs to call runlevel (0 or 6) to close all running processes.