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コマンド【 date 】システムの日付や時刻の表示・設定する
  2. Linuxコマンド【 sysctl 】カーネルパラメータを設定する
  3. Linuxコマンド【 ldd 】共有ライブラリへの依存関係を表示する
  4. Linuxコマンド【 reboot 】システムをすぐに再起動する
  5. Linuxコマンド【hostname】マシンのホスト名を表示・設定する
  6. コマンドリファレンス
  7. fuser - ファイルやソケットを使用しているプロセスを特定 - Linuxコマンド
  8. Linuxコマンド【shutdown】システムを終了する
  9. init - プロセス制御・ランレベルの変更 - Linuxコマンド
  10. Linuxコマンド【 bc 】シェルで数値計算を実行する

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