| |
The shutdown command is used to power-off, halt or reboot a linux machine. The following are commonly used variations of the shutdown command including several alternative commands.
shutdown | The default behavior of shutdown is usually to schedule shutdown for one minute. | shutdown -c | Cancel a pending shutdown. | shutdown 23:00 | Schedule a shutdown for 11 PM. |
shutdown +15 | Schedule a shutdown for 15 minutes from now. | shutdown now | Shutdown immediately. | shutdown +5 "Save now!" | Shutdown in 5 minutes and broadcast the message "Save now!" to all terminals. |
shutdown -H | Halt the machine. This is traditionally a drastic type of shutdown similar to a hard power-off. However, this may be implemented as a normal and immediate shutdown. | shutdown -P | Poweroff the machine with shutdown. This is usually the default but can be specified to remove any ambiguity. |
shutdown -r | Reboot the machine. | halt -f | Halts the machine without notifying any processes. This is perhaps the most immediate and drastic way to halt a linux box. The -f stands for force. | poweroff | Another command to power-off a linux box. Accepts the -f flag for a forced power-off. |
reboot | Reboot the box. Accepts the -f flag. Does not allow for a scheduled reboot as with the shutdown command. |
NotesIf root privileges are required to shutdown on your box you will have to prefix the commands above with sudo when you aren't logged in as root.
Linux Commands
This is the complete list of articles we have written about linux commands.
If you enjoyed this page, please consider bookmarking Simplicable.
© 2010-2023 Simplicable. All Rights Reserved. Reproduction of materials found on this site, in any form, without explicit permission is prohibited.
View credits & copyrights or citation information for this page.
|