Skip to content

shutdown Command Cheat Sheet

shutdown brings the system down in a secure way. All logged-in users are notified that the system is going down, and login operations are blocked.


Synopsis

shutdown [OPTIONS] [TIME] [WALL_MESSAGE]

Basic Usage

Shutdown in 1 Minute (Default)

If no time is specified, modern usage often defaults to 1 minute.

sudo shutdown

Shutdown Immediately

sudo shutdown now
(Alias for +0).


Scheduling

Relative Time (+m)

Shutdown in 30 minutes.

sudo shutdown +30

Absolute Time (hh:mm)

Shutdown at 11:00 PM.

sudo shutdown 23:00

Rebooting (-r)

Restart instead of powering off.

sudo shutdown -r now

Messages

Broadcast a custom message to all users (on terminals/SSH).

sudo shutdown +15 "Server maintenance starting soon. Save your work!"

Canceling a Shutdown (-c)

If you made a mistake or changed your mind.

sudo shutdown -c
You can also send a broadcast message explaining why.
sudo shutdown -c "Maintenance canceled. False alarm."


Notes

  • poweroff vs shutdown: poweroff is immediate. shutdown is polite (notifies users, prohibits new logins).
  • init: shutdown technically requests init (PID 1) to change runlevels.