(1) Shutdown
The shutdown command is used for shutdown restart with the syntax format:
shutdown [Options] Time
Where the-c option represents the shutdown command that cancels the previous setting, the-H command indicates shutdown, and the-r command indicates a restart
Example: Immediate restart: shutdown-h now
(2) Other power-off restart commands
Other shutdown commands: Halt, Poweroff, Init 0, other restart commands: Reboot, init 6
Note: The number after Init represents the operating level of the system: you can view the meaning of the number 0-6 in/etc/inittab, such as: 0--shutdown, single user, 2--not fully multiuser, not including NFS services, 3--full multiuser, 4--unassigned, 5--graphical interface, 6- -Restart
Modify the default operating level of the system, which can be modified in/etc/inittab to see the operating level of the system: Execute RunLevel command
(3) Logout
The logout command is used to log out and improve the security of the server.
Linux Learning Notes (9) Linux common commands shutdown restart command