Shutdown command in Linux-option

Source: Internet
Author: User
In Linux, shutdown command-option-general Linux technology-Linux technology and application information. For details, refer to the following section. Users familiar with Windows/XP must be familiar with the shutdown command, especially the shock wave virus. When the system prompts that the shutdown command is required to restart, the shutdown-a command can be used to save their urgent needs.

In fact, there is also a shutdown command in Linux, which is not inferior to Windows. Let's take a look at the specific application of the shutdown command.

The syntax of the shutdown command in Linux is as follows:

Shutdown [-cfFhknr (parameter name)] [-t seconds] time [Warning Information]

Specific parameter functions:
-C: cancel the previous shutdown command. It is worth noting that when you execute a command such as "shutdown-h", you only need to press the "Ctrl + C" key to interrupt the shutdown command. If you want to run the "shutdown-h 11: 10 &" command to transfer the shutdown to the background, you need to use the shutdown-c command to cancel the previous shutdown command.

-F does not execute fsck upon restart (Note: fsck is a program for checking and repairing the file system in Linux ).

-F: Execute fsck when restarting.

-H: Shut down the system. To some extent, the function is equivalent to that of the halt command.

-K only sends information to all users, but does not actually shut down.

-N does not call the init program to shut down, but is implemented by shutdown itself (usually shutdown calls init to shut down the program). Using this parameter will speed up shutdown, however, this shutdown method is not recommended.

-R shutdown and then restart the system.

-F <秒数> How many seconds is the delay between sending a warning message and a Shutdown signal. The warning information reminds you to save the current work.

[Time] How long will the shutdown command be executed. The time parameter can be hh: mm or + m. Hh: mm indicates the number of minutes when the shutdown command is executed. For example, "shutdown" indicates that shutdown will be executed. + M indicates that shutdown is executed in m minutes. The special usage is to use now to execute shutdown immediately. It is worth noting that this part of the parameter cannot be omitted.

[Warning Information] information to be sent to all login users.

Example:
Shutdown now: # shutdown-h now

Shut down after 5 minutes, and send a warning message to the Login User: # shutdown + 5 "System will shutdown after 5 minutes"
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.