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 Ubuntu, Debian, Fedora, and other distributions that use systemd, shutdown is a symbolic link to systemctl. Both commands control the same systemd targets.
Command Options
The most common shutdown options are:
-P,--poweroff- Power off the machine (this is the default)-h- Equivalent to-P, unless--haltis specified-H,--halt- Halt the machine without cutting power-r,--reboot- Reboot the machine-k- Do not shut down; only send the warning message to logged-in users--no-wall- Shut down without sending a warning message-c- Cancel a pending scheduled shutdown--show- Show the pending shutdown, if there is one (systemd 250 or newer)
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 +10When you schedule a shutdown, systemd confirms the time and reminds you how to cancel it:
Shutdown scheduled for Thu 2026-06-25 14:30:00 CEST, use 'shutdown -c' to cancel.The shutdown request is stored by systemd, so the confirmation appears immediately while the system keeps running until the scheduled time. Five minutes before that time, systemd creates the /run/nologin file, and non-root users can no longer log in.
To schedule a shutdown at 02:00:
sudo shutdown 02:00On systemd 250 or newer, use --show to check whether a shutdown is pending and when it will run. Ubuntu 22.04 ships systemd 249 and does not support this option:
sudo shutdown --showThe output is the same line you saw when the shutdown was scheduled:
Shutdown scheduled for Thu 2026-06-25 14:30:00 CEST, use 'shutdown -c' to cancel.When nothing is scheduled, the command prints No scheduled shutdown. instead.
Broadcast 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.
To send the warning without shutting the system down, add the -k option:
sudo shutdown -k +10 "Testing the maintenance warning"systemd still prints the Shutdown scheduled line, and --show lists the pending dry run. When the time comes, systemd skips the power-off and the system keeps running. To clear the dry run earlier, use sudo shutdown -c.
-k option still creates /run/nologin five minutes before the scheduled time, temporarily blocking new non-root logins. In the example above, logins are blocked after five minutes. Cancelling the dry run or letting it finish removes the file.If you only need to send a message to logged-in users, use the wall
command instead. On Ubuntu 26.04 and Debian 13, users connected over SSH do not receive these broadcasts. The wall guide explains why and how to reach them
.
Cancel a Scheduled Shutdown
To cancel a pending shutdown, use the -c flag:
sudo shutdown -cThe command prints nothing when it succeeds. On systemd 250 or newer, run sudo shutdown --show again to confirm that the shutdown is gone.
When you cancel a shutdown, systemd sends System shutdown has been cancelled to the terminals of logged-in users. The -c option also accepts a message argument, but systemd ignores it and sends its own text.
shutdown vs poweroff, halt, and systemctl
The shutdown command is not the only way to power off a Linux system from the terminal. On systemd distributions, poweroff and halt are also symbolic links to systemctl:
sudo poweroff- Power off immediately, the same assudo systemctl poweroffsudo halt- Halt the system without cutting power, the same assudo systemctl haltsudo shutdown now- Power off immediately through the traditional shutdown interface
On a systemd machine, shutdown now and poweroff give the same result. The difference is scheduling. shutdown accepts a time argument and a wall message, so you can warn users and power off later. poweroff requests an immediate power-off directly; use poweroff --no-wall if you do not want a wall message.
systemd 254 and newer can also schedule the action from systemctl with the --when= option. To power off in ten minutes, run:
sudo systemctl poweroff --when=+10minThis creates the same scheduled request as shutdown. sudo shutdown --show lists it, and sudo shutdown -c cancels it.
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 -k +10 | Warn without shutting down; temporarily block new logins |
sudo shutdown --show | Show the pending shutdown (systemd 250 or newer) |
sudo shutdown -c | Cancel a scheduled shutdown |
sudo systemctl poweroff --when=+10min | Power off in 10 minutes using systemd 254 or newer |
Troubleshooting
Failed to schedule shutdown: Access denied as the requested operation requires interactive authentication
You ran shutdown without sudo. Run the command again with sudo. If sudo reports that your user is not in the sudoers file, the account does not have sudo privileges. From an account with root access, add the user to the sudo group with sudo usermod -aG sudo username, or ask a system administrator to run the command.
bash: shutdown: command not found on Debian
On Debian, the default PATH for regular users does not include /usr/sbin, where shutdown is installed. Run the command with sudo, which searches /usr/sbin. If sudo is not installed, switch to root with su - and run shutdown now from the root shell. To give your user sudo access, see how to add a user to sudoers on Debian
.
Scheduled shutdown does not trigger
On systemd 250 or newer, run sudo shutdown --show to see when the shutdown is actually scheduled. On older versions, check the confirmation printed when you scheduled it. Check that the system clock and time zone are 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 systemd, -h always requests a power-off unless you also pass -H. If the machine stops but stays powered on, check that the command did not include -H and that you did not run halt. 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 shorthand for -P and powers off the machine, unless you combine it with -H. -P always powers off the hardware. -H halts the CPU and operating system but leaves the machine powered on.
Can I schedule a daily shutdown with shutdown?
The shutdown command schedules a one-time event, not a recurring one. For recurring shutdowns, add a cron
job to the root crontab with sudo crontab -e. The line 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.
Does Linux support shutdown -s -t 0?
No. The -s flag belongs to the Windows shutdown command, and Linux rejects it with shutdown: invalid option -- 's'. The -t flag is accepted for compatibility, but systemd ignores it together with its argument. As a result, shutdown -t now does not power off immediately; it schedules a power-off in one minute, the same as shutdown with no time. The legacy -a, -f, and -F flags are ignored the same way, so shutdown -f now is just shutdown now. To power off immediately, use sudo shutdown now or sudo shutdown +0.
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, --show to check a pending shutdown, and -c to cancel it. 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 1000+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page