Posted on 2010-01-30 23:56
斷點(diǎn) 閱讀(263)
評論(0) 編輯 收藏 所屬分類:
Linux
在Linux中有7種啟動級別,默認(rèn)是X-Window,像是Windows的窗口模式,而Linux的操作和配置一般我們都采用輸入命令的方式來完成,像DOS操作系統(tǒng)一樣,如何讓Linux一啟動就進(jìn)入這種模式呢?
方法:以管理員身份進(jìn)入Linux,修改文件:/etc/inittab文件,找到“id:5:initdefault:”,其中的5就是X-Window,
為默認(rèn)運(yùn)行級別,一般我們把5改為3即可。
一共有7種啟動級別,分別為:
# 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)
各個運(yùn)行級的詳細(xì)解釋:
0 為停機(jī),機(jī)器關(guān)閉。
1 為單用戶模式,就像Win9x下的安全模式類似。
2 為多用戶模式,但是沒有NFS支持。
3 為完整的多用戶模式,是標(biāo)準(zhǔn)的運(yùn)行級。
4 一般不用,在一些特殊情況下可以用它來做一些事情。例如在筆記本電腦的電池用盡時,可以切換到這個模式來做一些設(shè)置。
5 就是X11,進(jìn)到X Window系統(tǒng)了。
6 為重啟,運(yùn)行init 6機(jī)器就會重啟。
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Linux啟動順序:
1.load bios(hardware informantion)
2.read MBR's config to find out the OS
硬盤上的數(shù)據(jù)由五大部分組成,它們分別是:MBR區(qū)、DBR區(qū),F(xiàn)AT區(qū),DIR區(qū)和DATA區(qū)。
MBR - Main Boot Record 主引導(dǎo)記錄區(qū),位于整個硬盤的0磁道0柱面1扇區(qū)。
3.load the kernel of the OS
4.init process starts...
5.execute /etc/rc.d/sysinit
rc - run command
d - 后臺運(yùn)行的進(jìn)程
6.start other modules (/etc/modules.conf)
7.execute the run level scripts
0 - 系統(tǒng)停機(jī)狀態(tài)
1 - 單用戶工作
2 - 多用戶狀態(tài)(沒有nfs)
3 - 多用戶狀態(tài)(有nfs)network file system
4 - 系統(tǒng)未使用,留給用戶
5 - 圖形界面
6 - 系統(tǒng)正常關(guān)閉并重新啟動.
8.execute /etc/rc.d/rc.local
9.execute /bin/login
10.shell started...