Le moyen simple de redémarrer votre système CentOS/Linux consiste à utiliser le reboot
commande.
Pour plus d'options, vérifiez les paramètres :
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 [~]#
Vous devez être connecté en tant que root pour arrêter le système d'exploitation.
L'autre commande est shutdown
. C'est similaire à reboot
.
Pour redémarrer la machine avec l'shutdown
commande, utilisez :
shutdown -r now
Pour redémarrer la machine à un moment précis, utilisez :
shutdown -r 02:30
Pour redémarrer la machine après X minutes, utilisez :
shutdown -r X
Pour arrêter la machine, utilisez :
shutdown -h now
Pour arrêter la machine à une heure précise, utilisez :
shutdown -h 02:30
Pour éteindre la machine après X minutes, utilisez :
shutdown -h X
Pour plus d'options, vérifiez les paramètres de shutdown
commande :
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 [~]#
Pour plus d'informations, utilisez les commandes :
man reboot
man shutdown