偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

理解Linux中的shutdown、poweroff、halt和reboot命令

系統(tǒng) Linux
在本篇中,我們會(huì)向你解釋 shutdown、poweroff、halt 以及 reboot 命令。我們會(huì)解釋清楚當(dāng)你用那些可用的選項(xiàng)執(zhí)行的時(shí)候它們實(shí)際做了什么。

[[193040]]

在本篇中,我們會(huì)向你解釋 shutdown、poweroff、halt 以及 reboot 命令。我們會(huì)解釋清楚當(dāng)你用那些可用的選項(xiàng)執(zhí)行的時(shí)候它們實(shí)際做了什么。

如果你想深入 Linux 服務(wù)器管理,那么為了有效和可靠的服務(wù)器管理,這些重要的 Linux 命令你需要完全理解。

通常上,當(dāng)你想要關(guān)閉或者重啟你的機(jī)器時(shí),你會(huì)運(yùn)行下面之一的命令:

shutdown 命令

shutdown 會(huì)給系統(tǒng)計(jì)劃一個(gè)時(shí)間關(guān)機(jī)。它可以被用于停止、關(guān)機(jī)、重啟機(jī)器。

你可以指定一個(gè)時(shí)間字符串(通常是 now 或者用 hh:mm 指定小時(shí)/分鐘)作為***個(gè)參數(shù)。額外地,你也可以設(shè)置一個(gè)廣播信息在系統(tǒng)關(guān)閉前發(fā)送給所有已登錄的用戶。

重要:如果使用了時(shí)間參數(shù),系統(tǒng)關(guān)機(jī)前 5 分鐘,會(huì)創(chuàng)建 /run/nologin 文件。以確保沒有人可以再登錄。

shutdown 命令示例:

  1. # shutdown 
  2. # shutdown now 
  3. # shutdown 13:20   
  4. # shutdown -p now  ### 關(guān)閉機(jī)器 
  5. # shutdown -H now  ### 停止機(jī)器       
  6. # shutdown -r09:35 ### 在 09:35am 重啟機(jī)器 

要取消即將進(jìn)行的關(guān)機(jī),只要輸入下面的命令:

  1. # shutdown -c 

halt 命令

halt 通知硬件來停止所有的 CPU 功能,但是仍然保持通電。你可以用它使系統(tǒng)處于低層維護(hù)狀態(tài)。

注意在有些情況會(huì)它會(huì)完全關(guān)閉系統(tǒng)。下面是 halt 命令示例:

  1. # halt             ### 停止機(jī)器 
  2. # halt -p          ### 關(guān)閉機(jī)器 
  3. # halt --reboot    ### 重啟機(jī)器 

poweroff 命令

poweroff 會(huì)發(fā)送一個(gè) ACPI 信號(hào)來通知系統(tǒng)關(guān)機(jī)。

下面是 poweroff 命令示例:

  1. # poweroff           ### 關(guān)閉機(jī)器 
  2. # poweroff --halt    ### 停止機(jī)器 
  3. # poweroff --reboot  ### 重啟機(jī)器 

reboot 命令

reboot 通知系統(tǒng)重啟。

  1. # reboot           ### 重啟機(jī)器 
  2. # reboot --halt    ### 停止機(jī)器 
  3. # reboot -p        ### 關(guān)閉機(jī)器 

就是這樣了!如先前提到的,理解這些命令能夠有效并可靠地在多用戶環(huán)境下管理 Linux 服務(wù)器。你有一些額外的想法么?在評(píng)論區(qū)留言與我們分享。 

責(zé)任編輯:龐桂玉 來源: Linux中國
相關(guān)推薦

2023-12-10 12:43:30

Linux系統(tǒng)命令

2017-05-31 13:26:43

Linux服務(wù)器關(guān)機(jī)自定義消息

2009-12-25 16:39:24

Linux關(guān)機(jī)重啟命令

2011-08-23 15:14:35

reboot中文man

2011-08-23 14:21:16

poweroff中文man

2011-08-16 10:03:43

halt中文man

2010-06-24 17:11:01

Linux chkco

2009-10-22 16:00:37

Linux基本命令

2009-04-09 17:22:23

Linuxshutdown系統(tǒng)

2009-08-03 11:54:34

linux at命令linux at命令詳cron

2009-12-23 10:22:29

Halt關(guān)機(jī)命令

2019-04-12 14:26:17

Linux命令文件

2010-06-30 10:39:45

Linux SNMP

2019-12-10 09:53:27

LinuxCacheBuffer

2010-04-14 18:23:06

Unix操作系統(tǒng)

2021-06-15 16:11:51

Linux手冊(cè)頁

2023-12-21 13:59:41

2011-01-13 09:44:19

Linuxsudo技巧

2009-08-11 10:30:00

linux中du命令參linux命令行參數(shù)linux命令行

2019-01-21 09:06:08

Linuxetcservices
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)