Linux shutdown command
The Linux shutdown command can be used to perform a shutdown procedure, and before shutting down, send messages to all users about programs currently running; shutdown can also be used to reboot.
Permission required: system administrator.
Syntax
shutdown [-t seconds] [-rkhncfF] time [message]
Parameter Description:
- -t seconds : Set the shutdown to occur after a number of seconds.
- -k : Does not actually shut down; only sends warning messages to all users.
- -r : Reboot after shutdown.
- -h : Halt after shutdown.
- -n : Do not use the normal procedure to shut down; instead, forcibly kill all running programs and then shut down.
- -c : Cancel the currently in-progress shutdown.
- -f : Do not perform fsck (check the Linux filesystem) during shutdown.
- -F : Force fsck during shutdown.
- time : Set the shutdown time.
- message : A warning message sent to all users.
Example
Shut down immediately
# shutdown -h now
Shut down after a specified 10 minutes
# shutdown -h 10
Restart the computer
# shutdown -r now
Linux Command Reference