GNU/Linux >> Tutoriels Linux >  >> Linux

Comment arrêter ou redémarrer Linux

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

Linux
  1. Comprendre les commandes d'arrêt, de mise hors tension, d'arrêt et de redémarrage sous Linux

  2. Comment redémarrer Linux en utilisant la ligne de commande

  3. Commande de redémarrage Linux

  4. Arrêter la machine Windows à partir du terminal Linux

  5. Comment programmer un redémarrage sous Linux ?

Comment éviter un arrêt ou un redémarrage accidentel sous Linux

Comment redémarrer Linux Mint 20

Comment surveiller une machine Linux via Nagios

Comment utiliser la commande d'arrêt de Linux

Comment arrêter ou redémarrer Linux à l'aide de la ligne de commande

Comment arrêter ou redémarrer Debian 11