xref: /openbsd-src/sbin/reboot/reboot.8 (revision 7ed182d8b9351f66b03ce926e28914dde078800a)
1.\"	$OpenBSD: reboot.8,v 1.51 2024/12/21 05:01:25 jsg Exp $
2.\"	$NetBSD: reboot.8,v 1.3 1995/10/05 05:36:21 mycroft Exp $
3.\"
4.\" Copyright (c) 1990, 1991, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\"	@(#)reboot.8	8.1 (Berkeley) 6/9/93
32.\"
33.Dd $Mdocdate: December 21 2024 $
34.Dt REBOOT 8
35.Os
36.Sh NAME
37.Nm reboot ,
38.Nm halt
39.Nd stopping and restarting the system
40.Sh SYNOPSIS
41.Nm halt
42.Op Fl dnpq
43.Nm reboot
44.Op Fl dnq
45.Sh DESCRIPTION
46The
47.Nm halt
48and
49.Nm reboot
50utilities flush the file system cache to disk, execute the
51.Xr rc.d 8
52scripts specified by the
53.Va pkg_scripts
54variable defined in
55.Xr rc.conf 8
56in a reverse order,
57run the system shutdown script, send all running processes a
58.Dv SIGTERM
59.Pq and subsequently a Dv SIGKILL ,
60and, respectively, halt or restart the system.
61The action is logged, including entering a shutdown record into the login
62accounting file.
63.Pp
64The options are as follows:
65.Bl -tag -width Ds
66.It Fl d
67Causes system to create a dump before rebooting.
68This option is useful for debugging system dump procedures or
69capturing the state of a corrupted or misbehaving system.
70See
71.Xr savecore 8
72for information on how to recover this dump.
73.It Fl n
74Prevent file system cache from being flushed.
75This option should probably not be used.
76.It Fl p
77Causes the system to power down, if it is being halted, and the
78hardware supports automatic power down.
79.It Fl q
80Quick.
81The system is halted or restarted quickly and ungracefully, and only
82the flushing of the file system cache is performed.
83This option should probably not be used.
84.El
85.Pp
86Normally, the
87.Xr shutdown 8
88utility is used when the system needs to be halted or restarted, giving
89users advance warning of their impending doom.
90.Sh SEE ALSO
91.Xr reboot 2 ,
92.Xr utmp 5 ,
93.\" .Xr boot 8 ,
94.Xr boot_alpha 8 ,
95.Xr boot_amd64 8 ,
96.Xr boot_hppa 8 ,
97.Xr boot_i386 8 ,
98.Xr boot_luna88k 8 ,
99.Xr boot_macppc 8 ,
100.Xr boot_sparc64 8 ,
101.Xr rc.d 8 ,
102.Xr rc.shutdown 8 ,
103.Xr savecore 8 ,
104.Xr shutdown 8 ,
105.Xr sync 8
106.Sh HISTORY
107A
108.Nm reboot
109command appeared in
110.Bx 4.0 .
111