This article introduces the syntax and details of the Linux shutdown (restart) Command & mdash; shutdown. Shutdown is the safest command to shut down and restart. we recommend that you use the shutdown command to shut down and restart your system. Shutdown [Syntax] shutdown [options] [Parameters] [details] shutdown is the safest command to shut down and restart. we recommend that you use the shutdown command to shut down your system during normal use. In addition, this command supports timed operations.
This article introduces the shutdown syntax and details of the Linux shutdown (restart) command. Shutdown is the safest command to shut down and restart. we recommend that you use the shutdown command to shut down and restart your system.
Shutdown
[Syntax]Shutdown [option] [parameter]
[Details]Shutdown is the safest command to shut down and restart data. we recommend that you use the shutdown command to shut down data during normal use. In addition, this command supports scheduled operations.
[Option]
| Option |
Functions |
| - |
Specify permissions |
| -R |
Restart the calculator (same as the reboot) command |
| -K |
Simulate shutdown (only warning messages are sent to users, but not shutdown) |
| -H |
Turn off the computer and power off (commonly used) |
| -N |
Disable the computer by not calling the init process (not recommended) |
| -C |
Cancel executing shutdown command |
| -F |
Restart the computer without disk detection. |
| -F |
Restart the computer for disk detection |
| -T (seconds) |
Specifies the number of seconds to delay when a warning message is sent or deleted. |
[Additional parameters]
| Parameters |
Introduction |
| Time |
The time when the computer is disabled.
It can be a detailed time, such.
It can also be used as a detailed minute, for example, "+ 5", then shut down after 5 minutes. |
| Warning information |
It can be any text or information that must be enclosed in quotation marks. |
Example:
(1) run the shutdown command to restart the computer (add now to restart the computer immediately)
shutdown -r now
(2) set to shut down the computer one minute later, and prompt "1 minute after shutdown" in SSH"
shutdown -h +1 "1 minute after shutdown"
(3) cancel shutdown
To cancel shutdown and restart, press Ctrl + C to cancel the command being executed in SSH. Of course, if you log on to SSH again or in other cases, you can use the code to cancel (timed) shutdown.
shutdown -c