Linux 系統啟動過程
阿新 • • 發佈:2018-06-25
計算機 初始 poweroff nbsp serve 並且 color 在服務器 das
詳細過程可以查看 http://www.runoob.com/linux/linux-system-boot.html
Linux系統的啟動過程並不是大家想象中的那麽復雜,其過程可以分為5個階段:
- 內核的引導。
- 運行 init。
- 系統初始化。
- 建立終端 。
- 用戶登錄系統。
Linux 關機
在linux領域內大多用在服務器上,很少遇到關機的操作。畢竟服務器上跑一個服務是永無止境的,除非特殊情況下,不得已才會關機。
正確的關機流程為:sync > shutdown > reboot > halt
關機指令為:shutdown ,你可以man shutdown 來看一下幫助文檔。
例如你可以運行如下命令關機:
sync 將數據由內存同步到硬盤中。 shutdown 關機指令,你可以man shutdown 來看一下幫助文檔。例如你可以運行如下命令關機: shutdown –h 10 ‘This server will shutdown after 10 mins’ 這個命令告訴大家,計算機將在10分鐘後關機,並且會顯示在登陸用戶的當前屏幕中。 Shutdown –h now 立馬關機 Shutdown –h 20:25 系統會在今天20:25關機 Shutdown –h +10 十分鐘後關機 Shutdown –r now 系統立馬重啟 Shutdown –r +10 系統十分鐘後重啟 reboot 就是重啟,等同於 shutdown –r now halt 關閉系統,等同於shutdown –h now 和 poweroff
最後總結一下,不管是重啟系統還是關閉系統,首先要運行 sync 命令,把內存中的數據寫到磁盤中。
關機的命令有 shutdown –h now halt poweroff 和 init 0 , 重啟系統的命令有 shutdown –r now reboot init 6。
Linux 系統啟動過程