Linux – init 6 & reboot

Loading

同事問了一個問題 init 6 和 reboot 有何不同,的確這兩個動作有什麼不同,init 6 也是做 reboot 的動作.上網查詢一下!!我們先來看看 init 所定義的 runlevel

INIT:

Runlevel function
0 halt system
1 single user mode (for maintenance purposes, won't allow others to login)
3 multi-user mode (normal mode)
5 multi-user mode with GUI started (normal level for workstations using Xwindows)
6 reboot
Examples function
init 1 To set single user mode
init 6 reboot

可以得知 init 6 的基本功能就是 reboot 但是他和指令 #reboot 到底哪裡不一樣.

In Linux, the init 6 command gracefully reboots the system running all the K* shutdown scripts first, before rebooting. The reboot command does a very quick reboot. It doesn’t execute any kill scripts, but just unmounts filesystems and restarts the system. The reboot command is more forceful.

雖然網路上的文章都指出 init 6 的關機方式較溫和,會依據 /etc/rc.d/rc6.d/K* 先關閉所有的服務接下來才重新啟動系統,但 reboot 的方式不需經過  /etc/rc.d/rc6.d/K* 的方式一一關閉所有的服務程式.但是我在 x-windows(runlevel 5) 下,使用 init 6 以及 reboot 關機的動作基本上是一樣的.都會經過關閉服務的階段,不懂,真的不懂!!!
init6_reboot

沒有解決問題,試試搜尋本站其他內容

One thought on “Linux – init 6 & reboot

  1. 回應
    匿名使用者 (未確認)
    週五, 12/10/2010 – 14:31

    嗯.. 那應該是以前reboot/halt版本的行為
    2.74以後的的reboot除非在runlevel 0 或 6下….才能看出不同… 否則它會去呼叫shutdown.. 導致流程看起來一樣

發佈回覆給「admin」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料