On Unix-like operating systems, the halt, poweroff, and reboot commands stop, power down, or reboot the system, respectively.
This page covers the GNU/Linux versions of halt, poweroff, and reboot.
Description
halt, poweroff, and reboot are commands you can run as root to stop the system hardware.
Description
Syntax
Environment
Files
Examples
Related commands
Linux commands help
halt instructs the hardware to stop all CPU functions.
poweroff sends an ACPI signal which instructs the system to power down.
reboot instructs the system to reboot.
These commands require superuser privileges. If you are not logged in as root, you need to prefix the command with sudo or the signal isn’t sent.
Technical description
These programs allow a system administrator to reboot, halt or poweroff the system.
When called with –force or when in runlevel 0 or 6, this tool invokes the reboot system call itself (with REBOOTCOMMAND argument passed) and directly reboots the system. Otherwise, this invokes the shutdown tool with the appropriate arguments without passing REBOOTCOMMAND argument.
Before invoking reboot, a shutdown time record is first written to /var/log/wtmp
Syntax
reboot [OPTION]… [REBOOTCOMMAND]
halt [OPTION]…
poweroff [OPTION]…
Options
Environment
Files
Examples
halt
If you are logged in as root, issuing the halt command will cease all CPU function on the system. On most systems, this will drop you into single-user mode and then power off the machine.
sudo halt
If you’re not logged in as root, prefix the halt command with sudo to run the command as the superuser.
poweroff
If you are logged in as root, issuing the poweroff command sends an ACPI hardware signal which will instruct the system to commence with a complete and immediate shutdown. This is roughly equivalent to pressing the power button on a typical desktop computer.
sudo poweroff
Execute the poweroff command as root.
reboot
If you are logged in as root, issuing the reboot command will immediately initiate a reboot sequence. The system shuts down and then commence a warm boot.
sudo reboot
Execute the reboot command as root.
Related commands
shutdown — Schedule a time for the system to be powered down.