Linux Study Notes-Shutdown and restart commands

Source: Internet
Author: User

Linux Study Notes-Shutdown and restart commands

1. shutdown command:

1) "shutdown-h now" shut down immediately (h indicates halt); 2) "shutdown-h 10" shut down after 10 minutes; 3) "shutdown-h half past five" shutdown at (); 4) "poweroff" shutdown immediately; 5) "halt" shutdown immediately; 6) "init 0" shutdown immediately; 7) "shutdown-c" cancels the previous shutdown or restart command (c Indicates cancel ).

2. Restart command:

1) "shutdown-r now" restart immediately (r indicates reboot); 2) "shutdown-r half past five" at (); 3) "reboot" restart now; 4) "init 6" restart now.

Note:

1) The "shutdown" command must be a root user, and other users do not have the permission; 2) the "shutdown" command can send a warning message to all users, for example: "shutdown-r 10 I need to restart the system."; 3) when the "shutdown" command is shut down or restarted, the services running in the system will be saved first, therefore, the "shutdown" command is safe. (Some Other commands on the Internet are secure, others are insecure. When I view the commands under the "sbin" directory, I find that these commands are soft links, and points to the same file. Therefore, other commands are not evaluated for the time being. And then try again. For the sake of insurance, we recommend that you use the "shutdown" command when shutting down or restarting the instance under "root ).

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.