running level
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
init 0 #equal to halt
init 6 #equal to reboot
$cd /etc/rc.d
$ls
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rc.local
Run a service(nginx) only in level 3 and 5
chkconfig nginx off
chkconfig --level 35 nginx onTarget vs RunLevel
Last updated