xref: /openbsd-src/sbin/reboot/reboot.8 (revision 7ed182d8b9351f66b03ce926e28914dde078800a)
1*7ed182d8Sjsg.\"	$OpenBSD: reboot.8,v 1.51 2024/12/21 05:01:25 jsg Exp $
2df930be7Sderaadt.\"	$NetBSD: reboot.8,v 1.3 1995/10/05 05:36:21 mycroft Exp $
3df930be7Sderaadt.\"
4df930be7Sderaadt.\" Copyright (c) 1990, 1991, 1993
5df930be7Sderaadt.\"	The Regents of the University of California.  All rights reserved.
6df930be7Sderaadt.\"
7df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without
8df930be7Sderaadt.\" modification, are permitted provided that the following conditions
9df930be7Sderaadt.\" are met:
10df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright
11df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer.
12df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright
13df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer in the
14df930be7Sderaadt.\"    documentation and/or other materials provided with the distribution.
151ef0d710Smillert.\" 3. Neither the name of the University nor the names of its contributors
16df930be7Sderaadt.\"    may be used to endorse or promote products derived from this software
17df930be7Sderaadt.\"    without specific prior written permission.
18df930be7Sderaadt.\"
19df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22df930be7Sderaadt.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29df930be7Sderaadt.\" SUCH DAMAGE.
30df930be7Sderaadt.\"
31df930be7Sderaadt.\"	@(#)reboot.8	8.1 (Berkeley) 6/9/93
32df930be7Sderaadt.\"
33*7ed182d8Sjsg.Dd $Mdocdate: December 21 2024 $
34df930be7Sderaadt.Dt REBOOT 8
35df930be7Sderaadt.Os
36df930be7Sderaadt.Sh NAME
37df930be7Sderaadt.Nm reboot ,
38df930be7Sderaadt.Nm halt
396b985147Saaron.Nd stopping and restarting the system
40df930be7Sderaadt.Sh SYNOPSIS
41df930be7Sderaadt.Nm halt
4201de6d07Smickey.Op Fl dnpq
43df930be7Sderaadt.Nm reboot
4401de6d07Smickey.Op Fl dnq
45df930be7Sderaadt.Sh DESCRIPTION
46df930be7SderaadtThe
47df930be7Sderaadt.Nm halt
48df930be7Sderaadtand
49df930be7Sderaadt.Nm reboot
50424e0bc4Sajacoutotutilities flush the file system cache to disk, execute the
51424e0bc4Sajacoutot.Xr rc.d 8
52424e0bc4Sajacoutotscripts specified by the
538d985c15Sajacoutot.Va pkg_scripts
54424e0bc4Sajacoutotvariable defined in
55424e0bc4Sajacoutot.Xr rc.conf 8
56424e0bc4Sajacoutotin a reverse order,
57424e0bc4Sajacoutotrun the system shutdown script, send all running processes a
585eaf1a72Saaron.Dv SIGTERM
595eaf1a72Saaron.Pq and subsequently a Dv SIGKILL ,
605eaf1a72Saaronand, respectively, halt or restart the system.
61df930be7SderaadtThe action is logged, including entering a shutdown record into the login
62df930be7Sderaadtaccounting file.
63df930be7Sderaadt.Pp
64df930be7SderaadtThe options are as follows:
65df930be7Sderaadt.Bl -tag -width Ds
6601de6d07Smickey.It Fl d
675eaf1a72SaaronCauses system to create a dump before rebooting.
68df930be7SderaadtThis option is useful for debugging system dump procedures or
699615e1d4Saaroncapturing the state of a corrupted or misbehaving system.
709615e1d4SaaronSee
717a3499adSaaron.Xr savecore 8
727a3499adSaaronfor information on how to recover this dump.
735eaf1a72Saaron.It Fl n
745eaf1a72SaaronPrevent file system cache from being flushed.
755eaf1a72SaaronThis option should probably not be used.
76f403a9a2Sdownsj.It Fl p
775eaf1a72SaaronCauses the system to power down, if it is being halted, and the
789615e1d4Saaronhardware supports automatic power down.
793cc57546Sjmc.It Fl q
803cc57546SjmcQuick.
813cc57546SjmcThe system is halted or restarted quickly and ungracefully, and only
823cc57546Sjmcthe flushing of the file system cache is performed.
833cc57546SjmcThis option should probably not be used.
84df930be7Sderaadt.El
85df930be7Sderaadt.Pp
86df930be7SderaadtNormally, the
87df930be7Sderaadt.Xr shutdown 8
88df930be7Sderaadtutility is used when the system needs to be halted or restarted, giving
89df930be7Sderaadtusers advance warning of their impending doom.
90df930be7Sderaadt.Sh SEE ALSO
9154cb169cScloder.Xr reboot 2 ,
92df930be7Sderaadt.Xr utmp 5 ,
93a1ebaff6Smiod.\" .Xr boot 8 ,
94507260b4Sderaadt.Xr boot_alpha 8 ,
9531c83b9aSmiod.Xr boot_amd64 8 ,
96783cbaa1Smickey.Xr boot_hppa 8 ,
97507260b4Sderaadt.Xr boot_i386 8 ,
987f2a767bSjmc.Xr boot_luna88k 8 ,
99d84ac402Smiod.Xr boot_macppc 8 ,
100d84ac402Smiod.Xr boot_sparc64 8 ,
101424e0bc4Sajacoutot.Xr rc.d 8 ,
1026b985147Saaron.Xr rc.shutdown 8 ,
1036b985147Saaron.Xr savecore 8 ,
1046b985147Saaron.Xr shutdown 8 ,
1056b985147Saaron.Xr sync 8
106df930be7Sderaadt.Sh HISTORY
107df930be7SderaadtA
108df930be7Sderaadt.Nm reboot
109df930be7Sderaadtcommand appeared in
110*7ed182d8Sjsg.Bx 4.0 .
111