& Amp; 65279; & amp; 65279; after reading the man help information of the three commands: reboot, halt, and poweroff, it is found that the same functions are implemented. Purpose: Restart or disable the system syntax: reboot [options] halt [options] poweroff [options] Description: In part 1
Reboot, halt, poweroff
After reading the man help information of these three commands, we found that the same functions are implemented.
Purpose:
Restart or shut down the system
Syntax:
Reboot [options]
Halt [options]
Poweroff [options]
Description:
In some special cases, you can directly call the reboot system call itself to directly restart the system. In other cases, you can only call the shutdown command and add appropriate parameters to complete the corresponding functions.
Main parameters:
-F, -- force
Do not call shutdown, direct to action.
-P, -- poweroff
Behave aspoweroff
-W, -- wtmp-only
Do not perform shutdown or restart, but write the shutdown record to/var/log/wtmp.
-- Verbose
Output more comments for debugging
Affected files:
/Var/run/utmp
Modify the running level
/Var/log/wtmp
After the shutdown information is attached to this file
Example:
Do not perform shutdown or restart, only add Records
Sudo halt -- wtmp-only
Shut down and output comments
Sudo halt -- verbose