LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1062|回复: 7

如何实现自动关机(关电源)!

[复制链接]
发表于 2007-3-30 19:51:20 | 显示全部楼层 |阅读模式
用shutdown 试了不行了,要用什么参数啊?
发表于 2007-3-30 19:58:19 | 显示全部楼层
不是shutdown是halt
回复 支持 反对

使用道具 举报

发表于 2007-3-30 20:47:26 | 显示全部楼层
acpi问题?
回复 支持 反对

使用道具 举报

发表于 2007-3-30 21:09:07 | 显示全部楼层

命令不对

Post by wygdm
用shutdown 试了不行了,要用什么参数啊?

用poweroff
回复 支持 反对

使用道具 举报

发表于 2007-3-30 21:34:21 | 显示全部楼层
Usage:    shutdown [-akrhHPfnc] [-t secs] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -z:      shutdown using software suspend.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **
比如说如果你想8分钟后关机的话:
su
shutdown -time 8
:》
回复 支持 反对

使用道具 举报

发表于 2007-3-30 21:35:45 | 显示全部楼层
如果想马上关机的话:
shutdown -h now
回复 支持 反对

使用道具 举报

发表于 2007-3-30 22:17:07 | 显示全部楼层
有的用shutdown不能切断电源,是ACPI的问题.最好用halt
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-31 09:28:30 | 显示全部楼层
请问用halt能实现定时关机不?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表