Linuxコマンド【shutdown】システムを終了する

当ページのリンクには広告が含まれています。

スポンサーリンク

shutdownコマンドは、システムを終了するコマンドです。

shutdown

書式

shutdown [オプション] 時間

指定した時間にshutdownコマンドの処理を実施します。このコマンドを実行するには管理者(root)権限が必要です。

オプション

-f再起動時に fsck を行いません。
-F再起動時に fsck を行います。
-rシャットダウン後にシステムを再起動します。
-hシャットダウン後にシステムを停止します。
-kシャットダウンは行わず、ログイン中のユーザーへメッセージを送ります。
-qメッセージを表示しないようにします。

使用例

システムをすぐに(now)再起動します。

# shutdown -r now

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:42:17 2014):
The system is going down for reboot NOW!

システムをすぐに(now)停止します。

# shutdown -h now

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:43:46 2014):
The system is going down for system halt NOW!

システムを3分後に停止します。コマンドを実行するとシャットダウンへ向けてカウントダウンがはじまるので、シャットダウンを取り消したい場合は「Cntl」キーを押しながら「C」キーを押せば、OKです。

# shutdown -h 3

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:45:58 2014):
The system is going DOWN for system halt in 3 minutes!

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:46:58 2014):
The system is going DOWN for system halt in 2 minutes!

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:47:58 2014):
The system is going DOWN for system halt in 1 minute!

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:48:58 2014):
The system is going down for system halt NOW!

システムを14時52分に停止します。

# shutdown -h 14:52

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:51:08 2014):
The system is going DOWN for system halt in 1 minute!

Broadcast message from root@**** (pts/0) (Sun Mar 30 14:52:06 2014):
The system is going down for system halt NOW!

関連コマンド

halt, last, reboot

システム の人気記事

  1. Linuxコマンド【 script 】端末の操作を記録する
  2. Linuxコマンド【shutdown】システムを終了する
  3. Linuxコマンド【 bc 】シェルで数値計算を実行する
  4. コマンドリファレンス
  5. Linuxコマンド【 ldd 】共有ライブラリへの依存関係を表示する
  6. fuser - ファイルやソケットを使用しているプロセスを特定 - Linuxコマンド
  7. Linuxコマンド【 sysctl 】カーネルパラメータを設定する
  8. Linuxコマンド【 export 】環境変数を定義・リスト表示する
  9. Linuxコマンド【 runlevel 】現在のランレベルを確認する
  10. Linuxコマンド【 reboot 】システムをすぐに再起動する

関連記事(一部広告含む)