| 運(yùn)行級別 | 含 義 |
|---|---|
| 0 | 關(guān)機(jī) |
| 1 | 單用戶模式,可以想象為 Windows 的安全模式,主要用于系統(tǒng)修復(fù) |
| 2 | 不完全的命令行模式,不含 NFS 服務(wù) |
| 3 | 完全的命令行模式,就是標(biāo)準(zhǔn)字符界面 |
| 4 | 系統(tǒng)保留 |
| 5 | 圖形模式 |
| 6 | 重新啟動(dòng) |
[root@localhost ~]# runlevel
N 3
#N代表在進(jìn)入這個(gè)級別前,上一個(gè)級別是什么;3代表當(dāng)前級別
[root@localhost ~]# runlevel
5 3
#代表由5級別進(jìn)入3級別
[root@localhost ~]# init 5
#進(jìn)入圖形界面,當(dāng)然要已經(jīng)安裝了圖形界面才可以
[root@localhost ~]# init 0
#關(guān)機(jī)
[root@localhost ~]# init 6
#重新啟動(dòng)
[root@localhost ~]#vim /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
#系統(tǒng)會(huì)先調(diào)用/etc/init/rcS.conf
# Individual runlevels are started by /etc/init/rc.conf
#在調(diào)用/etc/init/rc.conf,在不同的運(yùn)行級別啟動(dòng)不同的服務(wù)
# Ctrl-Alt-Delete is handled by/etc/init/control-alt-delete.conf
#通過這個(gè)配置文件判斷Ctri+Alt+Delete熱啟動(dòng)鍵是否可用
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#判斷系統(tǒng)可以啟動(dòng)的本地終端數(shù)量及終端的基本設(shè)置(如顏色)
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# 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)
#很眼熟吧,就是剛剛的 0~6運(yùn)行級別的說明
id:3:initdefault:
#這就是系統(tǒng)的默認(rèn)運(yùn)行級別,也就是系統(tǒng)開機(jī)后直接進(jìn)入哪個(gè)運(yùn)行級別
新聞熱點(diǎn)
疑難解答
圖片精選