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