Linux shutdown Shutdown system command usage introduction

Source: Internet
Author: User

Linux Shutdown system command shutdown

Shutdown, reboot the system

Linux is a multiuser, multitasking system that can cause user data loss in the system if the system is not properly shut down or restarted. The possibility is that the user is performing a key operation or operation, etc., if the system is not prompted to shut down the user will be too late to save the current data, resulting in data loss. Therefore, you should master the correct way to shut down and restart the system to avoid data loss.

Turn off the system command shutdown

The shutdown command is the most commonly used shutdown system command, not only to shut down the system immediately, but also to shut down the system at a specified time.

(1) Shut down the system after 1 minutes:

# shutdown-h 1

Because administrator privileges are required to shut down and reboot the system, you should shut down and restart the system commands as root as shutdown.

Shut down the system now:

# shutdown-h Now

(2) A specified time to shut down the system:

# shutdown-h 15:30

When the root user issues a shutdown directive, other users in the system can receive the following prompt:

The system is going down for system halt in 2 minutes!

If you get this hint, the user should immediately stop the job in progress, save the necessary data, and then exit the system.

(3) The shutdown command can also be used to reboot the system:

# shutdown-r 2

The system will reboot in 2 minutes.

If more than one user is using the system, you should use the shutdown command when shutting down the system and use the method of delaying shutdown to avoid data loss.

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.