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

スポンサーリンク

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

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