poweroff Command Cheat Sheet
poweroff sends a signal to the system to bring it down and power off the machine.
Synopsis
poweroff [OPTIONS]
Basic Usage
Shut Down Immediately
sudo poweroff
systemctl poweroff or shutdown -h now.
Options
Force Power Off (-f)
If the system hangs and won't shut down normally (ignoring regular init), use force.
sudo poweroff -f
Don't Halt, Just Power Off (-p)
Usually default.
sudo poweroff -p
Reboot Instead (--reboot)
sudo poweroff --reboot
reboot).
Comparison of Commands
| Command | Action | Technical Details (Systemd) |
|---|---|---|
poweroff |
Shut down & Power cut | Links to systemctl poweroff. |
halt |
Stop OS | CPU stops, but power usually remains ON. |
reboot |
Restart | Links to systemctl reboot. |
shutdown |
Scheduled Stop | Can schedule time & warn users. Safe wrapper. |
Best Practice:
Use shutdown now or poweroff for immediate turn off. Use shutdown -h +10 for scheduled maintenance.
Notes
- In modern Systemd systems (Ubuntu, CentOS, Arch),
poweroff,reboot, andhaltare all symlinks tosystemctl. - ACPI: Poweroff requires ACPI support in BIOS/Kernel to actually cut the electricity.