linux /etc/inittab 的六個運行級別簡單理解
配置文件,系統在啟動的過程中會來讀取這個文件的信息
[[email protected] ~]# cat /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#此以上都為文件的解釋,下面0-6是運行級別的解釋
# Default runlevel. The runlevels used are:
# 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) 重啟
#
id:3:initdefault: 這裏才是這個文件配置的地方,在命令模式下,默認是級別 --3--。
這裏是不能亂改的,如果改為0,1,6 你的系統就開不機了
本文出自 “12993685” 博客,請務必保留此出處http://13003685.blog.51cto.com/12993685/1967287
linux /etc/inittab 的六個運行級別簡單理解