Init shutdown reboot Poweroff halt differences

Source: Internet
Author: User

Init

First look at several operating levels of Linux systems
# 0-Stop (do not set the Initdefault to 0, or the system will never start)
# 1-Single user mode
# 2-Multiuser, no NFS
# 3-Full multi-user mode (standard run level)
# 4– system Reserved
# 5-x11 (x Window)
# 6-Reboot (never set Initdefault to 6, otherwise it will be restarted)

#init 0 Switch to run level 0
The action is to run the following two scripts:

[[email protected] RC0.D] # pwd/etc/rc.d/rc0.d[[email protected] rc0.d]#  ls-lrt s*lrwxrwxrwx. 1 root root: S01halt.  /init.d/1 root root  : S00killall, June. /init.d/killall

#init 6 Switch to run Level 6
The action is to run the following two scripts:

[[email protected] RC6.D] # pwd/etc/rc.d/rc6.d[[email protected] rc6.d]#  ls-lrt s*lrwxrwxrwx. 1 root root: S01reboot.  /init.d/1 root root  : S00killall, June. /init.d/killall

Shutdown

Shutdown-bring the System Downshutdown [OPTION] ... Time [MESSAGE]-r requests that the system was rebooted after it had been brought down. -H requests that the system is either haltedorpowered off after it had been brought down, with the choice as to which left up to the system. -H requests that the system was halted after it had been brought down. -P requests that the system was powered off after it had been brought down. -C cancels a running shutdown. Time is  notSpecified with this option, the first argument isMESSAGE. -K only send out the warning messages andDisable logins, do notActually bring the system down.
# shutdown-r equals reboot, which prompts a warning message to all logged-in users on the system before the system shuts down, and then calls Init 6 # shutdown-h equals halt it prompts a warning message to all logged-in users on the system before the system shuts down, and then calls Init 0 # shutdown-p equals Poweroff It prompts a warning message to all logged-in users on the system before the system shuts down, and then calls Init 0

Reboot,poweroff,halt

Reboot,poweroff,halt is actually a command, and the latter two are links to reboot

[[email protected] RC0.D] # ls-lrt/sbin/reboot-rwxr-xr-x.  1 root root 14832 March  2012/sbin/reboot[[email protected] rc0.d]#lrwxrwxrwx. 1 root root  6 June  2013/sbin/poweroff- reboot[[email protected] rc0.d]#lrwxrwxrwx. 1 root root 6 June  2013/sbin/halt-reboot

Reboot without the--force parameter is actually called the shutdown name, reboot direct shutdown with the--force parameter

Init shutdown reboot Poweroff halt differences

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.