システムの終了と再起動
システムの終了と再起動
システムの終了や再起動時のルール
ポイント
- システムの終了や再起動にはshutdownコマンドを使う
- shutdownコマンドを実行できるのはrootユーザーだけ
![](https://kanda-it-school-kensyu.com/wp-content/uploads/632a88c780b8171c85c2cd24d661cbbb.png)
shutdownコマンドの書式
shutdown [オプション] 時間
shutdownコマンドの主なオプション
![](https://kanda-it-school-kensyu.com/wp-content/uploads/be7631d3113307dd45ea73e757f6921d.png)
引数の時間には、シャットダウンを開始する時刻(23:45など)もしくはシャットダウンを開始するまでの分数(5分後なら+5)と指定する
1.ただちにシステムを停止
[root@localhost ~]$shutdown -h now
2.ただちにシステムを再起動
[root@localhost ~]$shutdown -r now
3.10分後にシステムを再起動
[root@localhost ~]$shutdown -r +10
4.20時30分にシステムを再起動
[root@localhost ~]$shutdown -r 20:30
![](https://kanda-it-school-kensyu.com/wp-content/uploads/38565cc27eac9512006cb308be4632aa.png)
これで第3章Linuxの基本操作は終わりました!
![](https://kanda-it-school-kensyu.com/wp-content/uploads/518701e119d3a336206b1dd9cd102290.png)