Linux shutdown command halt explained in detail, please use halt -p or init 0 to shutdown

The halt instruction is used to shut down the system, and then notify the kernel whether to stop, restart, or turn off the power.
The necessary parameters are specified as follows:

-d 不在wtmp中记录
-f 强制关机或者重启,不调用shutdown
-h 让硬件保持standby的状态
-i 关闭系统前先关闭网络系统
-n 不执行sync
-p halt后执行poweroff
-w 在wtmp中记录,不关闭系统

Some customers directly halt, the server does not turn off the power after running, but the system is shut down, the server is still running! Please add -p parameter
Use halt -p to shut down the system and power off the server! ! ! !
You can also use the init command:

关机init 0   
重启init 6

Guess you like

Origin blog.csdn.net/e891377/article/details/108812626