GNU/Linux >> Linux の 問題 >  >> Linux

Linuxをシャットダウンまたは再起動する方法

CentOS / Linuxシステムを再起動する簡単な方法は、reboot コマンド。

その他のオプションについては、パラメータを確認してください:

root@web [~]# reboot --help
reboot [OPTIONS...] [ARG]

Reboot the system.

     --help      Show this help
     --halt      Halt the machine
  -p --poweroff  Switch off the machine
     --reboot    Reboot the machine
  -f --force     Force immediate halt/power-off/reboot
  -w --wtmp-only Don't halt/power-off/reboot, just write wtmp record
  -d --no-wtmp   Don't write wtmp record
     --no-wall   Don't send wall message before halt/power-off/reboot
root@web [~]#

オペレーティングシステムをシャットダウンするには、rootとしてログインする必要があります。

もう1つのコマンドは、 shutdownです。 rebootに似ています

shutdown を使用してマシンを再起動するには コマンド、使用:

shutdown -r now

特定の時間にマシンを再起動するには、次を使用します:

shutdown -r 02:30

X分後にマシンを再起動するには、次を使用します:

shutdown -r X

マシンをシャットダウンするには、次を使用します:

shutdown -h now

特定の時間にマシンをシャットダウンするには、次を使用します。

shutdown -h 02:30

X分後にマシンをシャットダウンするには、次を使用します。

shutdown -h X

その他のオプションについては、 shutdownのパラメータを確認してください コマンド:

root@web [~]# shutdown --help
shutdown [OPTIONS...] [TIME] [WALL...]

Shut down the system.

     --help      Show this help
  -H --halt      Halt the machine
  -P --poweroff  Power-off the machine
  -r --reboot    Reboot the machine
  -h             Equivalent to --poweroff, overridden by --halt
  -k             Don't halt/power-off/reboot, just send warnings
     --no-wall   Don't send wall message before halt/power-off/reboot
  -c             Cancel a pending shutdown
root@web [~]#

詳細については、次のコマンドを使用してください。

man reboot
man shutdown

Linux
  1. Linuxのrebootおよびshutdownコマンド

  2. 例を使用して Linux のシャットダウンおよび再起動コマンドを使用する方法

  3. Linux ターミナルから Windows マシンをシャットダウンする

  1. Linuxでシャットダウンおよび再起動コマンドを無効にする方法

  2. Linuxでのシャットダウン、電源オフ、停止、および再起動コマンドについて理解する

  3. Linux で再起動をスケジュールするにはどうすればよいですか?

  1. コマンドラインを使用してLinuxをシャットダウンまたは再起動する方法

  2. Linuxでシステムの稼働時間を確認する方法

  3. コマンドラインを使用してLinuxを再起動する方法