linux 關機命令:linux
1- init 0 關機。ui
具體詳情接受能夠 init --help 查詢 以下:this
init [OPTIONS...] {COMMAND}get
Send control commands to the init daemon.it
--help Show this help
--no-wall Don't send wall message before halt/power-off/rebootio
Commands:
0 Power-off the machine
6 Reboot the machine
2, 3, 4, 5 Start runlevelX.target unit
1, s, S Enter rescue mode
q, Q Reload init daemon configuration
u, U Reexecute init daemoncommand
2- shutdown -h now 馬上關機 shutdown 詳情介紹以下:im
--help Show this help
-H --halt Halt the machine
-P --poweroff Power-off the machine
-r --reboot Reboot the machine
-h Equivalent to --poweroff, overridden by --halt
-k Don't halt/power-off/reboot, just send warnings
--no-wall Don't send wall message before halt/power-off/reboot
-c Cancel a pending shutdown查詢
3- halt 命令di
Halt the system.
--help Show this help
--halt Halt the machine
-p --poweroff Switch off the machine
--reboot Reboot the machine
-f --force Force immediate halt/power-off/reboot
-w --wtmp-only Don't halt/power-off/reboot, just write wtmp record
-d --no-wtmp Don't write wtmp record
--no-wall Don't send wall message before halt/power-off/reboot
4- poweroff
Power off the system.
--help Show this help--halt Halt the machine-p --poweroff Switch off the machine--reboot Reboot the machine-f --force Force immediate halt/power-off/reboot-w --wtmp-only Don't halt/power-off/reboot, just write wtmp record-d --no-wtmp Don't write wtmp record--no-wall Don't send wall message before halt/power-off/reboot