Linux centos shutdown and restart command detailed and actual

  

Linux centos restart command: ■ 1, reboot ■ 2, shutdown -r now restart immediately (root user) ■ 3, shutdown -r 10 automatically restart after 10 minutes (root User use) ■ 4, shutdown -r 20:35 Restart at time 20:35 (used by the root user) If the restart is set by the shutdown command, you can use the shutdown -c command to cancel the restart of the Linux centos shutdown command: ■ 1, Halt shut down immediately ■ 2, poweroff immediately shut down ■ 3, shutdown -h now shut down immediately (root user) ■ 4, shutdown -h 10 10 minutes after the automatic shutdown If the shutdown command is set to shut down, you can use the shutdown -c command Cancel the restart 1.shutdownshutdown command to safely shut down the system. Some users will shut down Linux by directly disconnecting the power supply, which is very dangerous. Because linux and windows are different, there are many processes running in the background, so forcible shutdown may result in data loss of the process, making the system unstable, and even in some systems, the hardware device will be damaged. Using the shutdown command before the system is shut down, the system administrator will notify all logged-in users that the system will be shut down. And the login command will be frozen, ie the new user can no longer log in. It is possible to shut down directly or delay the system for a certain period of time, and it may be restarted. This is determined by all the processes that receive the signal from the system. This allows programs like vi to have time to store documents that are currently being edited, while programs like mail and news can leave normally. The shutdown to perform its job is to send a signal to the init program, asking it to change the runlevel. Runlevel 0 is used to stop [halt], runlevel 6 is used to reactivate the [reboot] system, and runlevel 1 is used to get the system into a state where management can be performed; this is preset, assuming no -h There is also no -r parameter for shutdown. To find out what actions have been taken during a halt or reboot, you can see these runlevels related information in this file /etc/inittab. Shutdown Parameter Description: [-t] Tells init how long to shut down before changing to other runlevels. [-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 turning off the power. [-n] Instead of init, shut yourself down. This option is discouraged and the consequences of this option are often not always what you expect. [-c] cancel current process Cancel the shutdown program currently being executed. So of course this option has no time parameters, but you can enter a message for explanation, 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] Set the time before shutdown [shutdown]. 2.halt— - The simplest shutdown command, in fact, halt is to call shutdown -h. When halt is executed, the application process is killed, the sync system call is executed, and the kernel system stops when the file system write operation is completed.

Copyright © Windows knowledge All Rights Reserved