shutdown Command in Linux: Power Off, Reboot, and Schedule

The shutdown command brings the system down in a secure way. When a shutdown is initiated, all logged-in users and processes are notified that the system is going down, and no further logins are allowed. You can shut down your system immediately or schedule it for a specific time.
This guide explains the most common shutdown options with practical examples.
Syntax
The shutdown command takes the following form:
shutdown [OPTIONS] [TIME] [MESSAGE]OPTIONS— the action to perform: power off (default), halt, or rebootTIME— when to perform the shutdown:now,+m(minutes from now), orhh:mm(absolute time)MESSAGE— a message broadcast to all logged-in users
Only root and users with sudo
privileges can run shutdown.
On modern Linux distributions, shutdown is a compatibility alias for systemctl. Both commands control the same systemd targets.
Power Off the System
When used with no arguments, shutdown powers off the machine after a one-minute delay:
sudo shutdownTo power off immediately, use now:
sudo shutdown nowThe +0 argument is equivalent to now:
sudo shutdown +0Power Off with -h
The -h flag halts or powers off the system. On most modern systems with systemd, -h behaves the same as the default power-off action:
sudo shutdown -h nowTo power off at a specific time:
sudo shutdown -h 11:00To power off in 30 minutes:
sudo shutdown -h +30Use -P to make the power-off behavior explicit, regardless of system defaults:
sudo shutdown -P nowUse -H to halt the system without powering off the hardware (the machine stops but remains powered):
sudo shutdown -H nowReboot the System
To reboot, use the -r flag:
sudo shutdown -r nowYou can specify a delay and a custom message:
sudo shutdown -r +5 "Updating kernel"The command above reboots the system after 5 minutes and broadcasts Updating kernel to all logged-in users.
Schedule a Shutdown
The TIME argument accepts two formats:
+m— number of minutes from nowhh:mm— absolute time in 24-hour format
To schedule a shutdown in 10 minutes:
sudo shutdown +10To schedule a shutdown at 02:00:
sudo shutdown 02:00Broadcast a Custom Message
To send a message to all logged-in users along with the standard shutdown notification, add it after the time argument:
sudo shutdown +30 "Hardware upgrade in progress"A time argument is required when specifying a custom message.
Cancel a Scheduled Shutdown
To cancel a pending shutdown, use the -c flag:
sudo shutdown -cYou can include an optional message to notify users the shutdown has been cancelled:
sudo shutdown -c "Shutdown cancelled"Quick Reference
| Command | Description |
|---|---|
sudo shutdown now | Power off immediately |
sudo shutdown -h now | Halt or power off immediately |
sudo shutdown -r now | Reboot immediately |
sudo shutdown +10 | Power off in 10 minutes |
sudo shutdown 02:00 | Power off at 02:00 |
sudo shutdown -r +5 "msg" | Reboot in 5 minutes with a message |
sudo shutdown -H now | Halt without powering off |
sudo shutdown -P now | Power off explicitly |
sudo shutdown -c | Cancel a scheduled shutdown |
Troubleshooting
sudo shutdown requires a password or is not permitted
Your user account does not have sudo privileges. Add the user to the sudo group with sudo usermod -aG sudo username, or ask a system administrator to run the command.
Scheduled shutdown does not trigger
Check that the system clock is set correctly with timedatectl. If the absolute time you specified has already passed for today, the shutdown will be scheduled for the same time the following day.
-h does not power off the hardware
On some systems, -h halts the CPU but does not cut power. Use -P to explicitly request a power-off, or use sudo poweroff directly.
FAQ
What is the difference between shutdown -h, shutdown -P, and shutdown -H?-h is a combined flag that halts or powers off, depending on the system default — on most modern systemd systems it powers off. -P always powers off the hardware. -H halts the CPU and operating system but leaves the machine powered on.
What is the difference between shutdown now and poweroff?
Both achieve the same result on a systemd system. shutdown now is the traditional command that works across most Unix-like systems and sends broadcast notifications to users. poweroff is a direct systemd alias that powers off immediately with no delay or notification.
Can I schedule a daily shutdown with shutdown?
The shutdown command schedules a one-time event, not a recurring one. For recurring shutdowns, use a cron
job: 0 22 * * * /sbin/shutdown -h now shuts the system down at 22:00 every day.
How do I reboot from the command line without shutdown?
Use sudo reboot or sudo systemctl reboot. Both are equivalent to sudo shutdown -r now on systemd systems.
Conclusion
The shutdown command lets you power off, halt, or reboot a Linux system immediately or on a schedule. Use shutdown -h now for the most portable power-off command, -r to reboot, and -c to cancel any pending shutdown. For managing system services, see the systemctl guide
.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page