Vol. I · No. 46The command line sectionSat, 10 Oct 2026
Linux · process & service management

shutdown

power off or restart

shutdown brings the system down in order: services are stopped, data is written to disk, filesystems are unmounted. It can be scheduled for later and cancelled, with a warning sent to everyone logged in.

shutdown -r now restarts; shutdown -h now powers off. Both do it cleanly.

Power off
shutdown -h now
or poweroff
Restart
shutdown -r now
or reboot
Later
+10 or 23:00
minutes from now, or a time
Cancel
shutdown -c
before it happens

At the terminal

Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.

root@netflow — bashsystemd
# shutdown -r +10 "Kernel update, back in 5 minutes"
1Reboot scheduled for Wed 2026-09-30 10:52:07 IST, use 'shutdown -c' to cancel.
2# shutdown -c
3# shutdown -h now
4Connection to 192.0.2.10 closed by remote host.
Illustrative session · names, sizes and dates are examples, and every address is from a documentation or private range
Reading the output

What the numbered lines are telling you

1
A restart in ten minutes

Everyone logged in sees the message, and new logins are refused shortly before the time.

2
Changed your mind

-c cancels a scheduled shutdown. Users are told it was called off.

3
Power off immediately

-h halts and powers off; "now" means no delay.

4
Over SSH, the connection drops

The machine is going down. If it is remote and you chose -h, someone must now press its power button.

Switches

A switch changes how the command behaves. These are the ones used day to day; man shutdown lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.

-h
Halt and power off.
-r
Reboot.
-c
Cancel a scheduled shutdown.
now
Do it immediately. +10 means in ten minutes; 23:00 means at that time.
-k
Send the warning message only; do not shut down.

Variations worth knowing

The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.

sudo reboot

Restarts now. The same as shutdown -r now.

sudo poweroff

Powers off now.

sudo shutdown -r 23:30

Restarts at half past eleven tonight.

systemctl suspend

Suspends to memory instead of shutting down.

In cybersecurity

Powering off a remote machine is an outage you may not be able to undo from where you sit.

Check which machine

With several SSH sessions open, it is easy to reboot the wrong one. Look at the host name in the prompt before pressing Enter.

-h on a remote server

A halted machine does not come back by itself. Unless you have remote power control, use -r.

Reboots apply the patches

A kernel update does nothing until the machine restarts. Planned, announced reboots are part of keeping a server secure.

Filed under

Process & service management

Read alongside