iT邦幫忙

5

Linux連載 2

由小雨大來拋磚引玉.歡迎大家自由補充.
建議後面就加上流水號.
按下電源就開機了,那要怎麼關機呢???
例一:10分鐘後關機

shutdown -h 10

例二:直接關機

halt

例三:重新開機

reboot

or

shutdown -r now

=========================================
Linux連載 1


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中
0
老鷹(eagle)
iT邦高手 1 級 ‧ 2013-12-18 16:51:00

謝謝謝謝
筆記筆記
老鷹有問題 shutdown 的參數是什麼??
雖然google的到老鷹還是來找茶,
幫助後面有需要的人直接知道指令用法~~!
shutdown -h 10 = 10分鐘後關機,他只能用分鐘去計算嗎? 還是可以以小時或者以天??

麻煩各位大神教學~~!
謝謝謝謝

<pre class="c" name="code">shutdown(8)                                                        shutdown(8)

NAME
       shutdown - bring the system down

SYNOPSIS
       shutdown [OPTION]...  TIME [MESSAGE]

DESCRIPTION
       shutdown arranges for the system to be brought down in a safe way.  All
       logged-in users are notified that the system is going down and,  within
       the last five minutes of TIME, new logins are prevented.

       TIME  may  have  different  formats, the most common is simply the word
       ’now’ which will bring the system down immediately.  Other  valid  for-
       mats  are  +m,  where m is the number of minutes to wait until shutting
       down and hh:mm which specifies the time on the 24hr clock.

       Once TIME has elapsed, shutdown sends a request to the  init(8)  daemon
       to bring the system down into the appropriate runlevel.

time的格式有 now, 現在.
+m 之後幾分鐘
hh:mm 指定時間,例如 21:30 晚上9點半.

後面還可以加訊息.

0
總裁
iT邦好手 1 級 ‧ 2013-12-18 17:47:52

要不要加個前後篇的LINK,不然磚都找不到玉了.....暈

0
小財神
站方管理人員 ‧ 2013-12-18 18:48:17

也可以約定一個比較特別的tag,就可以串起來,不然只用linux很容易跟別的混在一起。

我要留言

立即登入留言