Shutdown with basic Linux knowledge

Source: Internet
Author: User

To shut down the Linux Command, you must first switch to the root user.

 

1. Direct Shutdown

Shutdown-H now

 

2. Shut down in three minutes

Shutdown-H + 3 [+ 3] indicates shutdown in three minutes

 

3. Shut down in three minutes and display the information to the user

Shutdown-H + 3 "system will shutdown after 3 minutes"

 

4. commands for directly restarting the computer

Shutdown-R now. Similarly, restart after three minutes, with the message: shutdown-R + 3 "system will restart after 3 minutes"

 

5. Command for shutdown at the specified time

Shutdown-H. indicates that the computer will be shut down. Similarly, you can add a prompt.

 

6. Specify the shutdown time and place it in the background for execution.

Since the computer is too early to shut down, we still need to do other work. Therefore, you can place it in the background for execution. You only need to add the "&" symbol after it.

For example:

Zhangzhiwei @ Ubuntu :~ $ Sudo shutdown-H: 00 "system will shutdown "&

[1] 14624

The output 14624 indicates the ID of the shutdown process. If you want to cancel shutdown, kill it. Example: Kill 14624

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.