CentOS 6.5 system shutdown and restart command usage

Source: Internet
Author: User
Tags current time centos

1. shutdown command (root permission required)

Usage: shutdown [OPTION]... TIME [MESSAGE]
OPTION: OPTION
TIME: TIME
MESSAGE: warning MESSAGE sent to all users
Options:
-R: restart the system after the system service is stopped.
-H: shut down the system immediately after the service is stopped.
-H: shut down the system immediately after the service is stopped (that is,-h)
-P: immediately shut down the system after the service is stopped (that is,-h)
-C: cancels an ongoing shutdown process.
-K: only sending warning messages, not actually shutting down

Example:

Shutdown-r now restart now
Shutdown-h now shut down immediately

Shutdown-h 'I will shutdown' system shut down at today. If the current time is after, shutdown again at the next day and send the I wil shutdown message
Shutdown-h + 30 system shutdown after 30 minutes

II. Shutdown command halt

Age: halt [OPTION]...

-N: do not execute sync before shutdown or restart (data synchronization is written to the disk)
-F: shutdown or restart without calling shutdown.
-P: This option is the default option, that is, poweroff is called during shutdown.
-W: not a real restart or shutdown, but a wtmp (/var/log/wtmp) record.


III. Shutdown command poweroff

Same as halt

IV. Switch execution level init

Switch execution level

Init 0: Shutdown
Init 6: Restart

V. Restart command reboot

Same as halt

The preceding commands can be viewed by man, for example:

Man shutdown

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.