Imported upstream version 1.5
[manpages-zh.git] / raw / man8 / halt.8
blob6a88ebbdda91bc656ae586a5148feddbc18a6499
1 .\"{{{}}}
2 .\"{{{  Title
3 .TH HALT 8 "Nov 6, 2001" "" "Linux System Administrator's Manual"
4 .\"}}}
5 .\"{{{  Name
6 .SH NAME
7 halt, reboot, poweroff \- stop the system.
8 .\"}}}
9 .\"{{{  Synopsis
10 .SH SYNOPSIS
11 .B /sbin/halt
12 .RB [ \-n ]
13 .RB [ \-w ]
14 .RB [ \-d ]
15 .RB [ \-f ]
16 .RB [ \-i ]
17 .RB [ \-p ]
18 .RB [ \-h ]
19 .br
20 .B /sbin/reboot
21 .RB [ \-n ]
22 .RB [ \-w ]
23 .RB [ \-d ]
24 .RB [ \-f ]
25 .RB [ \-i ]
26 .br
27 .B /sbin/poweroff
28 .RB [ \-n ]
29 .RB [ \-w ]
30 .RB [ \-d ]
31 .RB [ \-f ]
32 .RB [ \-i ]
33 .RB [ \-h ]
34 .\"}}}
35 .\"{{{  Description
36 .SH DESCRIPTION
37 \fBHalt\fP notes that the system is being brought down in the file
38 \fI/var/log/wtmp\fP, and then either tells the kernel to halt, reboot or
39 poweroff the system.
40 .PP
41 If \fBhalt\fP or \fBreboot\fP is called when the system is
42 \fInot\fP in runlevel \fB0\fP or \fB6\fP, in other words when it's running
43 normally, \fBshutdown\fP will be invoked instead (with the \fB-h\fP
44 or \fB-r\fP flag). For more info see the \fBshutdown\fP(8)
45 manpage.
46 .PP
47 The rest of this manpage describes the behaviour in runlevels 0
48 and 6, that is when the systems shutdown scripts are being run.
49 .\"}}}
50 .\"{{{  Options
51 .SH OPTIONS
52 .IP \fB\-n\fP
53 Don't sync before reboot or halt.
54 .IP \fB\-w\fP
55 Don't actually reboot or halt but only write the wtmp record
56 (in the \fI/var/log/wtmp\fP file).
57 .IP \fB\-d\fP
58 Don't write the wtmp record. The \fB\-n\fP flag implies \fB\-d\fP.
59 .IP \fB\-f\fP
60 Force halt or reboot, don't call \fBshutdown\fP(8).
61 .IP \fB\-i\fP
62 Shut down all network interfaces just before halt or reboot.
63 .IP \fB\-h\fP
64 Put all harddrives on the system in standby mode just before halt or poweroff.
65 .IP \fB\-p\fP
66 When halting the system, do a poweroff. This is the default when halt is
67 called as \fBpoweroff\fP.
68 .\"}}}
69 .\"{{{  Diagnostics
70 .SH DIAGNOSTICS
71 If you're not the superuser, you will get the message `must be superuser'.
72 .\"}}}
73 .\"{{{  Notes
74 .SH NOTES
75 Under older \fBsysvinit\fP releases , \fBreboot\fP and \fBhalt\fP should
76 never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP
77 invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This
78 means that if \fBhalt\fP or \fBreboot\fP cannot find out the current
79 runlevel (for example, when \fI/var/run/utmp\fP hasn't been initialized
80 correctly) \fBshutdown\fP will be called, which might not be what you want.
81 Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP.
82 .PP
83 The \fB-h\fP flag puts all harddisks in standby mode just before halt
84 or poweroff. Right now this is only implemented for IDE drives. A side
85 effect of putting the drive in standby mode is that the write cache
86 on the disk is flushed. This is important for IDE drives, since the
87 kernel doesn't flush the write-cache itself before poweroff.
88 .PP
89 The \fBhalt\fP program uses /proc/ide/hd* to find all IDE disk devices,
90 which means that /proc needs to be mounted when \fBhalt\fP or
91 \fBpoweroff\fP is called or the \fB-h\fP switch will do nothing.
92 .PP
93 .\"}}}
94 .\"{{{  Author
95 .SH AUTHOR
96 Miquel van Smoorenburg, miquels@cistron.nl
97 .\"}}}
98 .\"{{{  See also
99 .SH "SEE ALSO"
100 .BR shutdown (8),
101 .BR init (8)
102 .\"}}}