Linux 系統啓動過程

詳細過程能夠查看  http://www.runoob.com/linux/linux-system-boot.htmlhtml

Linux系統的啓動過程並非你們想象中的那麼複雜,其過程能夠分爲5個階段:linux

  • 內核的引導。
  • 運行 init。
  • 系統初始化。
  • 創建終端 。
  • 用戶登陸系統。

Linux 關機

在linux領域內大多用在服務器上,不多遇到關機的操做。畢竟服務器上跑一個服務是永無止境的,除非特殊狀況下,不得已纔會關機。服務器

正確的關機流程爲:sync > shutdown > reboot > haltspa

關機指令爲:shutdown ,你能夠man shutdown 來看一下幫助文檔。server

例如你能夠運行以下命令關機:htm

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文檔

相關文章
相關標籤/搜索