All rights reserved, please indicate the source when citing
shutdown - Shutdown system
Shutdown is a system command, so most Linux distributions require superuser privileges to execute it. The basic syntax is shutdown [OPTIONS] [TIME] [MESSAGE].
Some important options include:
- -h : Shutdown, which is the most common option used to turn off the system.
- -r : Reboot.
- -c : Cancel a previously scheduled shutdown or restart.
- -t : Specify the countdown time in seconds before the shutdown or restart.
The time parameter can be specified in different formats, such as:
- now : Execute the shutdown or restart immediately.
- +m : Execute the shutdown or restart after m minutes, e.g., +10 means after 10 minutes.
- hh:mm : Execute the shutdown or restart at the specified time, e.g., 22:30 means at 10:30 PM.
Examples:
# shutdown -h 10:08 ←Specify that the system will shut down at 10:08
# shutdown +3 "System will shutdown after 5 minutes" ←Specify that the system will shut down in 3 minutes and notify other logged-in users |
For more examples and usage, please refer to the provided link.