System and processes

The poweroff command

Powers off the machine now, stopping services in order. On systemd systems it is a link to systemctl poweroff, and it requires administrator privileges.

Syntax

poweroff [opciones]Try it in the terminal →

Most useful options

--no-wallDoes not send the notice to connected users
--no-blockReturns control immediately, without waiting for the shutdown to finish
-fSkips the orderly stop of services and kills the processes. It can lose data

Copy-ready examples

$ sudo poweroffpowers off now and notifies the connected users.
$ sudo poweroff --no-wallpowers off without notifying anyone. Use it only if nobody else is connected.
$ sudo shutdown -P +15powers off in 15 minutes. Unlike poweroff, shutdown does schedule the power-off.
$ sudo shutdown -ccancels a power-off that was scheduled.

You can try them in the browser terminal: it does not touch your computer.

Common errors

MessageCauseFix
No error messageShutdown takes almost two minutes and then forces it. A service does not stop in time: systemd waits for DefaultTimeoutStopSec (90 seconds by default) and then kills it.Check what blocks it with systemctl list-jobs and journalctl -b. Fix that service and, if needed, adjust TimeoutStopSec in its unit.

Typical mistakes

  • poweroff does not schedule anything: it runs now. For later, use shutdown -P +10.
  • On a remote server, powering off without physical access leaves the machine stopped until someone turns it on. Make sure you can start it again.

Differences from similar commands

  • shutdown: accepts a time (+15, 22:00) and notifies the users. poweroff acts right away.
  • reboot: reboots instead of powering off. On systemd, reboot, halt and poweroff are links to systemctl with a different action.

Security

poweroff shuts down for everyone: whoever is connected loses their session and unsaved work. On servers, check who is there with who and warn them first. --no-wall suppresses the notice, but it is no excuse to power off without warning. -f and -ff skip the orderly stop of services and can corrupt databases or open files.

Related commands

FAQ

What is the difference between poweroff and shutdown -h now?

On systemd systems, almost none: shutdown -h also powers off. shutdown can schedule and warn; poweroff cannot.

Why does shutdown take more than a minute?

Some service does not respond to the stop. systemd waits for the unit timeout (90 seconds by default) and then kills it. Check what failed with journalctl -b.

Can I power off without being root?

It depends on the polkit configuration. On a local desktop, the active user usually has permission; over SSH or on servers, usually not, and sudo is needed.

More System and processes commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course