halt 中文man页面

系统
Halt 将系统正在关机的信息写入 /var/log/wtmp 文件,然后通知内核停止重启或关机系统。如果 halt 或 reboot 是在系统 没有 运行在运行级别 0 或 6 ,系统将调用 shutdown(8) 命令(使用参数 -h 或 -r )。

NAME

halt, reboot, poweroff - 中止系统运行  

SYNOPSIS

/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i]  

描述

Halt 将系统正在关机的信息写入 /var/log/wtmp 文件,然后通知内核停止重启或关机系统。如果 haltreboot 是在系统 没有 运行在运行级别 06 ,系统将调用 shutdown(8) 命令(使用参数 -h-r )。  

选项

-n
在关机或重启之前不对系统缓存进行同步。
-w
不真正重启或关机,而仅仅将关机信息写入 wtmp (在 /var/log/wtmp 文件里)。
-d
不记录此次关机情况。当使用 -n 参数时隐含 -d
-f
强制执行 halt 或 reboot 而不去调用 shutdown(8)。
-i
在关闭或重启系统之前关闭所有网络界面。
-p
当关闭系统时执行关闭电源操作。当以 poweroff 方式调用 halt 时,此为缺省参数。

DIAGNOSTICS

If you're not the superuser, you will get the message `must be superuser'.  

注意

在先前的 sysvinit 发布中,reboothalt 不能直接调用。从版本 2.74 开始,当系统不是运行在运行级别0或6的时侯,执行 haltreboot 后实际调用的是 shutdown(8) 。这就意味着如果在当前运行级别的环境中无法找到
 halt 或 reboot 的时候(比如,在 /var/run/utmp  还没有正确初始化的时候),将会调用 shutdown,这个结果也许非你所想。如果你想做一此硬的 haltreboot,那么使用 -f 参数。

作者

Miquel van Smoorenburg, miquels@cistron.nl  

参见

shutdown(8), init(1)   #p#

NAME

halt, reboot, poweroff - stop the system.  

SYNOPSIS

/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]  

DESCRIPTION

Halt notes that the system is being brought down in the file /var/log/wtmp, and then either tells the kernel to halt, reboot or poweroff the system.

If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's running normally, shutdown will be invoked instead (with the -h or -r flag). For more info see the shutdown(8) manpage.

The rest of this manpage describes the behaviour in runlevels 0 and 6, that is when the systems shutdown scripts are being run.  

OPTIONS

-n
Don't sync before reboot or halt.
-w
Don't actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
-d
Don't write the wtmp record. The -n flag implies -d.
-f
Force halt or reboot, don't call shutdown(8).
-i
Shut down all network interfaces just before halt or reboot.
-h
Put all harddrives on the system in standby mode just before halt or poweroff.
-p
When halting the system, do a poweroff. This is the default when halt is called as poweroff.

DIAGNOSTICS

If you're not the superuser, you will get the message `must be superuser'.  

NOTES

Under older sysvinit releases , reboot and halt should never be called directly. From release 2.74 on halt and reboot invoke shutdown(8) if the system is not in runlevel 0 or 6. This means that if halt or reboot cannot find out the current runlevel (for example, when /var/run/utmp hasn't been initialized correctly) shutdown will be called, which might not be what you want. Use the -f flag if you want to do a hard halt or reboot.

The -h flag puts all harddisks in standby mode just before halt or poweroff. Right now this is only implemented for IDE drives. A side effect of putting the drive in standby mode is that the write cache on the disk is flushed. This is important for IDE drives, since the kernel doesn't flush the write-cache itself before poweroff.

The halt program uses /proc/ide/hd* to find all IDE disk devices, which means that /proc needs to be mounted when halt or poweroff is called or the -h switch will do nothing.

AUTHOR

Miquel van Smoorenburg, miquels@cistron.nl  

SEE ALSO

shutdown(8), init(8)

责任编辑:韩亚珊 来源: 互联网
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 15:39:42

fcloseall中文man

2011-08-25 15:00:15

cfgetispeed中文man

2011-08-19 18:35:50

issue中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 17:40:25

setvbuf中文man

2011-08-23 14:21:16

poweroff中文man

2011-08-24 15:52:59

intro中文man

2011-08-23 13:40:31

2011-08-25 15:54:08

ferror中文man

2011-08-25 17:24:54

puts中文man

2011-08-25 18:34:55

ungetc中文man

2011-08-23 10:03:40

useradd中文man

2011-08-23 10:29:02

chpasswd中文man

2011-08-23 10:34:22

convertquot中文man

2011-08-23 15:39:34

rpmbuild中文man

2011-08-24 15:48:38

INSERT中文man
点赞
收藏

51CTO技术栈公众号