码迷,mamicode.com
首页 > 系统相关 > 详细

linux 关机方式

时间:2016-08-04 17:37:53      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:

linux 关机命令:

1-  init 0 关机。

具体详情接受可以 init --help 查询 如下:


init [OPTIONS...] {COMMAND}

Send control commands to the init daemon.

--help Show this help
--no-wall Don‘t send wall message before halt/power-off/reboot

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 daemon

2-  shutdown -h now 立刻关机 shutdown 详情介绍如下:

--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 命令


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

linux 关机方式

标签:

原文地址:http://www.cnblogs.com/dashouqianxiaoshou/p/5737401.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!