Home > Article > Operation and Maintenance > 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
2. There are 7 directories named rcN.d under /etc/rc.d, corresponding to the 7 operating levels of the system
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. .
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
##5 . To check the running level, use: runlevelThe 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!