The shutdown
command is used to halt, power off, or reboot the system.
shutdown [OPTIONS...] [TIME] [WALL...]
now
. Before shutting down, this may be followed by a wall message delivered to all logged-in users.hh:mm
for hours or minutes, which specifies the shutdown time in a 24-hour clock format.+m
, which refers to the number of minutes (m
) from now
.now
is an alias for +0
, which is used to force an immediate shutdown.+1
is the default, meaning the system shuts down in 1 minute.Note: To specify a wall message, a time argument must be specified.
The different options available are as follows:
Option | Description |
---|---|
--help |
Prints help text |
-H or --halt |
Halt the system |
-P or --poweroff |
Power-Off the system |
-r or --reboot |
Reboot the machine |
-k |
Write the wall message without halt, power-off, or reboot the machine |
--no-wall |
Do not send wall message before halt, power-off, or reboot the machine |
-c |
Cancel a pending shutdown |
The command below sends a wall message to all logged-in users before shutting down:
shutdown 'Hello Users! System Shutting Down'
The command below shuts down the system at 4:30 PM. The command takes the time argument in a 24-hour format:
shutdown -h 16:30
The following command restarts the system with a wall message at 4:30 PM:
shutdown -r 16:30 'Restarting System. Save your work'