Some of the commonly used shutdown/Restart commands under Linux are shutdown, halt, reboot, Poweroff, and Init, all of which can achieve the purpose of shutting down the system, but the internal working process of each command is different.
< Span style= "margin:0px; padding:0px; max-width:100%; font-size:18px; Font-family: Blackbody, Simhei; " > Linux CentOS Restart command:
1, reboot
2. Shutdown-r now #立刻重启
3, Shutdown-r #过10分钟自动重启
< Span style= "LINE-HEIGHT:27PX; Color:rgb (68, 68, 68); margin:0px; padding:0px; max-width:100%; font-size:18px; Font-family: Blackbody, Simhei; " >4, Shutdown-r 20:35 #时间为20:35-time restart
< Span style= "font-family: Blackbody, Simhei;" > Linux CentOS Shutdown command:
1, Halt #立刻关机
2, Poweroff #立刻关机
3. Shutdown-h now #立刻关机
< Span style= "font-family: Blackbody, Simhei;" >4, shutdown-h #10分钟后自动关机
tip: If you set a restart on time by using the Shutdown command, you can cancel the restart with the Shutdown-c command.
< Span style= "font-family: Blackbody, Simhei;" > description Shutdown Command:
The shutdown command can safely shut down the system. Bad practice is a dangerous way to shut down Linux using a direct command to break off the power supply (for example: Halt command, Poweroff command). Because many processes are running 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.
2.halt Shutdown command
The halt command is called Shutdown-h. When halt executes, the kernel is stopped after the application process is killed and the file system writes are completed.
3.reboot : cause the host to restart.
4.init : Init 0 for shutdown,init 1 restart.
Linux shutdown commands