The
poweroff,
halt and
reboot utilities flush the file system cache to disk, send all running processes a
SIGTERM, wait for up to 30 seconds for them to die, send a
SIGKILL to the survivors and, respectively, power down, halt or restart the system. The action is logged, including entering a shutdown record into the login accounting file and sending a message via
syslog(3).
The options are as follows:
-d
Create a dump before halting or restarting. This option is useful for debugging system dump procedures or capturing the state of a corrupted or misbehaving system.
-l
Suppress sending a message via
syslog(3) before halting or restarting.
-n
Do not flush the file system cache. This option should be used with extreme caution. It can be used if a disk or the processor is on fire.
-p
Attempt to powerdown the system. If the powerdown fails, or the system does not support software powerdown, the system will halt. This option is only valid for halt.
-q
Do not give processes a chance to shut down before halting or restarting. This option should not normally be used.
If there are any arguments passed to
reboot they are concatenated with spaces and passed as
bootstr to the
reboot(2) system call. The string is passed to the firmware on platforms that support it.
Normally, the
shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom.