Shutdown Linux shutdown (restart) command

Source: Internet
Author: User

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 [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 scheduled operations.
[Option]


Option corresponding function-a specify permission-r restart calculator (same as reboot) command-k simulate Shutdown (only sends a warning message to the user but does not shut down)-HShut down the computer and power off (commonly used)-n do not call the init process to shut down the computer (not recommended)-c cancel the command being executed-f restart the computer, however, do not perform disk detection-F restart the computer and perform disk detection-t (s) specify the number of seconds to delay sending and deleting information

[Additional parameters]


Parameters

Introduction

Time refers to 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 can be any text, which 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 

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.