Home  >  Article  >  Operation and Maintenance  >  There are several runlevels in linux

There are several runlevels in linux

(*-*)浩
(*-*)浩Original
2019-11-07 11:38:383301browse

There are several runlevels in linux

Linux system has 7 run levels (runlevel) (Recommended learning: linux operation and maintenance)

运行级别0:系统停机状态,系统默认运行级别不能设为0,否则不能正常启动
运行级别1:单用户工作状态,root权限,用于系统维护,禁止远程登陆
运行级别2:多用户状态(没有NFS)
运行级别3:完全的多用户状态(有NFS),登陆后进入控制台命令行模式
运行级别4:系统未使用,保留
运行级别5:X11控制台,登陆后进入图形GUI模式
运行级别6:系统正常关闭并重启,默认运行级别不能设为6,否则不能正常启动

Principle of run level:

1. There are many server script programs under the directory /etc/rc.d/init.d, generally called services

There are several runlevels in linux

2. There are 7 directories named rcN.d under /etc/rc.d, corresponding to the 7 operating levels of the system

There are several runlevels in linux

3. There are some symbolic link files in the rcN.d directory. These link files point to the service script file in the init.d directory. The naming rule is K nn service name or S nn service name, where nn is a two-digit number. .

There are several runlevels in linux

4. The system will enter the corresponding rcN.d directory according to the specified run level and retrieve the link files in the directory in order of file names

For For files starting with K, the system will terminate the corresponding service

For files starting with S, the system will start the corresponding service

There are several runlevels in linuxThere are several runlevels in linux

##5 . To check the running level, use: runlevel


There are several runlevels in linux

6. To enter other running levels, use: init N

7. In addition, init 0 means shutdown, init 6. Restart the system

In addition, when using runlevel to view the run level, the result will display the previous run level and the current run level. If the previous run level is N, it means that there was no previous run level. (Maybe just power on).

The above is the detailed content of There are several runlevels in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn