Linux shutdown command
The Linux shutdown command can be used to perform the shutdown procedure, and before shutting down, it sends messages to all users' running programs. shutdown can also be used to reboot.
Usage permissions: System administrator.
Syntax
shutdown [-t seconds] [-rkhncfF] time [message]
Parameter description:
- -t seconds : Set the shutdown procedure to be performed after a few seconds.
- -k : It does not actually shut down, just sends warning messages to all users.
- -r : Reboot after shutdown.
- -h : Halt after shutdown.
- -n : Shut down without the normal procedure, forcibly killing all running programs and then shutting down on its own.
- -c : Cancel the shutdown action currently in progress.
- -f : When shutting down, do not perform the fsck action (checking the Linux file system).
- -F : When shutting down, force the fsck action.
- time : Set the shutdown time.
- message : The warning message sent to all users.
Examples
Shut down immediately
# shutdown -h now
Shut down after 10 minutes
# shutdown -h 10
Restart the computer
# shutdown -r nowOther extensions
Linux Command Reference