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