HxHippy

shutdown

Shut down or reboot the system

Overview

Schedules a time for the system to be powered down. It can be used to halt, power-off, or reboot the machine, and can notify logged-in users.

Syntax

shutdown [OPTION]... [TIME] [MESSAGE]

Common Options

-r, --reboot

Reboot the system after shutdown.

-h, --halt

Halt or power-off the system after shutdown. Often implies power-off.

-P, --poweroff

Explicitly power-off the machine after shutdown (default if -h is used on many systems).

-k

Don't actually shut down, but send the warning messages to all logged-in users (kibitz).

-c

Cancel a pending shutdown. No TIME argument can be given with this option.

TIME

Specifies when to perform the shutdown. Can be an absolute time in hh:mm format, or +m for minutes from now. 'now' is an alias for +0.

MESSAGE

Optional message to send to all logged-in users before shutdown.

Examples

$ sudo shutdown now

Shuts down and powers off the system immediately.

$ sudo shutdown -h now

Halts the system immediately (may or may not power off depending on system).

$ sudo shutdown -P now

Powers off the system immediately.

$ sudo shutdown -r now

Reboots the system immediately.

$ sudo shutdown -r +10 "System rebooting in 10 minutes for maintenance"

Schedules a reboot in 10 minutes and sends the specified message to users.

$ sudo shutdown 22:00 "System shutting down at 10 PM. Please save your work."

Schedules a shutdown (power off) at 10:00 PM (22:00) with a message.

$ sudo shutdown -c

Cancels a pending shutdown.

$ sudo shutdown -k

Sends a warning message to all users but does not actually schedule a shutdown.

shutdownreboothaltpoweroffsystemadminschedulerestart