CentOS Shutdown and restart command shutdown-r now reboot

Source: Internet
Author: User

Tags: windows init Source command detailed span mode window parameter Description tab

CentOS shutdown and restart commands in detail with the actual combat Linux CentOS Restart command:1, reboot2, Shutdown-R now restarts (root user)3, Shutdown-rTenautomatic Restart after 10 minutes (root user)4, Shutdown-r -: *Restart on time 20:35 (root user) If you set the restart via the shutdown command, you can use shutdown-C command to cancel restarting the Linux CentOS Shutdown command:1, halt immediately shut down the machine2, Poweroff immediately shut down the machine3, Shutdown-h now shuts down (root user)4, shutdown-hTenAuto Power off after 10 minutes if you set the shutdown via the shutdown command, you can use shutdown-C command Cancel restart1the. Shutdown shutdown command Safely shuts down the system. It is dangerous for some users to turn Linux off using a direct power-off.  Because Linux, unlike Windows, runs many processes in the background, forcing a shutdown can cause data loss to the process, leave the system in an unstable state, or even damage the hardware device in some systems.  With the shutdown command before the system shuts down, the system administrator notifies all logged-on users that the system will be closed. And the login command is frozen, that is, the new user can no longer log in. It is possible to shut down directly or delay a certain amount of time before shutting down, and it may be possible to restart the computer. This is determined by all process (process) receiving the signal (signal) the system arrives at.  This allows programs like VI to have time to store documents that are currently being edited, while programs like Mail (mail) and news (news) can leave normally and so on.  Shutdown performs its job of sending a signal (signal) to the INIT program, requiring it to change the runlevel. Runlevel 0 is used to stop (halt),runlevel 6 is used to reactivate the (reboot) system, while Runlevel 1 is used to get the system into the state of the management work can be carried out, this is a preset, assuming that there is no-H also no-The r parameter is given to shutdown. To understand what actions are being done during the shutdown (halt) or reboot (reboot), you can/etc/Inittab See these runlevels related information. Shutdown parameter Description: [-T] tell init how long it will shut down before changing to another runlevel. [-R] Restart the calculator. [-K] does not really shut down, just send a warning signal to each login (login). [-h] Turn off the power (halt) after shutting down the machine. [-N] do not use init, but to shut down the machine.  The use of this option is discouraged, and the consequences of this option are often not always what you expect it to be. [-c] Cancel current process cancels the currently executing shutdown program.  So this option certainly does not have a time parameter, but you can enter a message to interpret, and this information will be sent to each user. [-F] Ignore fsck when restarting the calculator (reboot). [-F] Force fsck When restarting the calculator (reboot). [-time] To set the (shutdown) before shutdown. 2. halt--The simplest shutdown command actually halt is to call shutdown.-H.  When the halt executes, the application process is killed, the sync system is called, and the kernel is stopped after the file system write operation is complete. Parameter description: [-n] Prevents the sync system from being called, which is used after patching the root partition with fsck to prevent the kernel from overwriting the patched super block with the old version of the Super Block (superblock). [-W] is not a real reboot or shutdown, just write wtmp(/var/log/Wtmp) record. [-d] Do not write wtmp record (included in options [-N]). [-F] Forced shutdown or restart without calling shutdown. [-i] turn off all network interfaces before shutting down (or restarting). [-p] This option is the default option.  is to call Poweroff when shutting down the machine. 3The working process of the. Reboot reboot is almost the same as halt, but it is caused by a host reboot, and Halt is shutdown.  Its parameters are not much different from the halt. 4. Init init is the ancestor of all processes, and its process number is always 1, so sending a term signal to init terminates all user processes ﹑ daemons and so on. Shutdown is the use of this mechanism. Init defines 8 runlevel (runlevel) and init 0 shuts down,init 1 for reboot. There is no longer a narrative about Init, which can be lengthy. There are also telinit commands that can change the runlevel of Init, such as,telinit-Is enables the system to enter single-user mode with no information and wait time when using shutdown. Linux How to modify the root administrator password to log in as root (SSH operation) Enter the passwd command to see the prompt to enter a new password---------------------s_mming Source: CSDN Original: https://blog.csdn.net/mr_ming_/article/details/79717813Copyright NOTICE: This article is for bloggers original article, reprint please attach blog link!

CentOS Shutdown and restart command shutdown-r now reboot

Related Article

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.