poweroff Command Generator
Generate poweroff commands to switch off the machine
Getting Started with poweroff
## What is poweroff?
The `poweroff` command shuts the system down cleanly and then switches off the machine's power. It goes through `shutdown` by default, which notifies logged-in users, stops services, unmounts filesystems, and finally tells the hardware to remove power.
## How to Use
1. **Choose Options**: Pick force, no-wtmp, no-sync, or interface-shutdown flags. 2. **Run as Root**: Execute the generated command with `sudo` or as root. 3. **Save Your Work**: Save anything open before running — the machine will turn off. 4. **Copy & Run**: Copy the generated command into your terminal.
> `poweroff`, `halt -p`, and `shutdown -h now` all switch the machine off. `reboot` uses the same options to restart instead. See those generators if your goal is slightly different.
Common Options
### `-f` Force Force an immediate power off without invoking `shutdown`. Skips user warnings, service shutdown, and filesystem sync — use only when the system is unresponsive.
### `-w` Write only Write a `wtmp` shutdown record but do not actually power off. Useful for testing the logbook on a non-live system.
### `-d` No wtmp Suppress the `wtmp` shutdown record. Useful in containers or recovery environments.
### `-i` Shut down network interfaces Bring down all network interfaces before powering off, which can help remote NICs log out cleanly.
### `-n` No sync Skip the `sync(2)` call before power off. Risky — unwritten filesystem data may be lost. Use only in recovery scenarios.
▶What's the difference between poweroff and shutdown?
▶Is -n (no sync) ever safe?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee