Arrêtez

Vidéo synchronisée dans ce chapitre: https://edu.51cto.com/sd/e4874

1.6 Shutdown
1.6.1 sync-flush buffers du système de fichiers
sync [OPTION]
[root @ localhost ~] # sync
1.6.2 shutdown-Halt, éteindre ou redémarrer l'
arrêt de la machine [OPTIONS ...] [TIME] [WALL. ..]
(1) Arrêtez immédiatement
[root @ localhost ~] # shutdown -h now
(2) Arrêtez après 10 minutes
[root @ localhost ~] # shutdown -h 10 'J'arrêterai après 10 minutes'
(3) 20h : 25 Arrêt
[root @ localhost ~] # shutdown -h 20:25
(4) Redémarrez immédiatement
[root @ localhost ~] # shutdown -r now
(5) N'envoyez que des messages d'arrêt, mais ne fermez pas vraiment
[root @ localhost ~ ] # shutdown -k now 'Ce système va redémarrer'
(6) Annuler la commande d'arrêt qui a été émise mais pas encore exécutée
[root @ localhost ~] # shutdown -c
1.6.3 halt, poweroff, reboot-Halt, power-off ou redémarrez la machine,
arrêtez [OPTIONS ...]
poweroff [OPTIONS ...]
reboot [OPTIONS ...]
[root @ localhost ~] # halt
[root @ localhost ~] # reboot
[root @ localhost ~] # poweroff
1.6.4 systemctl
[root @ localhost ~] # systemctl poweroff
[root @ localhost ~] # systemctl halt
[root @ localhost ~] # systemctl reboot
1.6.5 init
[root @ localhost ~] # init 0 #Shutdown
[root @ localhost ~] # init 6
#Restart 1.6.6 Remarque
[calflyok @ localhost sbit] $ shutdown -h
Doit être root. #Remarque
: 1. La commande shutdown ne peut être exécutée que par root.
2. Vous pouvez autoriser d'autres utilisateurs à effectuer l'arrêt.

Je suppose que tu aimes

Origine blog.51cto.com/5482173/2486435
conseillé
Classement