1*1bfbbe60Ssevan.\" $NetBSD: reboot.8,v 1.30 2016/09/12 05:43:15 sevan Exp $ 2ce5ebe99Scgd.\" 3369451e4Scgd.\" Copyright (c) 1990, 1991, 1993 4369451e4Scgd.\" The Regents of the University of California. All rights reserved. 5369451e4Scgd.\" 6369451e4Scgd.\" Redistribution and use in source and binary forms, with or without 7369451e4Scgd.\" modification, are permitted provided that the following conditions 8369451e4Scgd.\" are met: 9369451e4Scgd.\" 1. Redistributions of source code must retain the above copyright 10369451e4Scgd.\" notice, this list of conditions and the following disclaimer. 11369451e4Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 12369451e4Scgd.\" notice, this list of conditions and the following disclaimer in the 13369451e4Scgd.\" documentation and/or other materials provided with the distribution. 14276d62f6Sagc.\" 3. Neither the name of the University nor the names of its contributors 15369451e4Scgd.\" may be used to endorse or promote products derived from this software 16369451e4Scgd.\" without specific prior written permission. 17369451e4Scgd.\" 18369451e4Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19369451e4Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20369451e4Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21369451e4Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22369451e4Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23369451e4Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24369451e4Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25369451e4Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26369451e4Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27369451e4Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28369451e4Scgd.\" SUCH DAMAGE. 29369451e4Scgd.\" 30369451e4Scgd.\" @(#)reboot.8 8.1 (Berkeley) 6/9/93 31369451e4Scgd.\" 32*1bfbbe60Ssevan.Dd September 12, 2016 33369451e4Scgd.Dt REBOOT 8 34369451e4Scgd.Os 35369451e4Scgd.Sh NAME 36369451e4Scgd.Nm reboot , 37416a0bcaShubertf.Nm poweroff , 38369451e4Scgd.Nm halt 3973d9fb5bSwiz.Nd restarting, powering down and stopping the system 40369451e4Scgd.Sh SYNOPSIS 41369451e4Scgd.Nm halt 4232cebeb7Swiz.Op Fl dlnpqvxz 43416a0bcaShubertf.Nm poweroff 4432cebeb7Swiz.Op Fl dlnqvxz 45990562bfSwiz.Nm 4632cebeb7Swiz.Op Fl dlnqvxz 477a2d8df5Suwe.Op Ar arg ... 48369451e4Scgd.Sh DESCRIPTION 49369451e4ScgdThe 50416a0bcaShubertf.Nm poweroff , 51369451e4Scgd.Nm halt 52369451e4Scgdand 53be24f789Slukem.Nm 54369451e4Scgdutilities flush the file system cache to disk, send all running processes 55322ddd58Sdhollanda 56322ddd58Sdholland.Dv SIGTERM , 57322ddd58Sdhollandwait for up to 30 seconds for them to die, send a 58322ddd58Sdholland.Dv SIGKILL 59322ddd58Sdhollandto the survivors and, respectively, power down, halt or restart the system. 60369451e4ScgdThe action is logged, including entering a shutdown record into the login 61d9c745bfSsimonbaccounting file and sending a message via 62d9c745bfSsimonb.Xr syslog 3 . 63369451e4Scgd.Pp 64369451e4ScgdThe options are as follows: 65369451e4Scgd.Bl -tag -width Ds 66fd25fd5aSmycroft.It Fl d 67bc0a5a65SmycroftCreate a dump before halting or restarting. 68fd25fd5aSmycroftThis option is useful for debugging system dump procedures or 69fd25fd5aSmycroftcapturing the state of a corrupted or misbehaving system. 70bc0a5a65Smycroft.It Fl l 71d9c745bfSsimonbSuppress sending a message via 72bc0a5a65Smycroft.Xr syslog 3 73bc0a5a65Smycroftbefore halting or restarting. 74bc0a5a65Smycroft.It Fl n 75bc0a5a65SmycroftDo not flush the file system cache. 7609cbac4eSwizThis option should be used with extreme caution. 77a97eadf7SpookaIt can be used if a disk or a processor is on fire. 785f9840e9Sthorpej.It Fl p 7909cbac4eSwizAttempt to powerdown the system. 8009cbac4eSwizIf the powerdown fails, or the system does not support 8109cbac4eSwizsoftware powerdown, the system will halt. 8209cbac4eSwizThis option is only valid for 835f9840e9Sthorpej.Nm halt . 8400ef49e9Sdyoung.It Fl v 8500ef49e9SdyoungTo enable verbose messages on the console, pass the 8600ef49e9Sdyoung.Xr boothowto 9 8700ef49e9Sdyoungflag 8800ef49e9Sdyoung.Dv AB_VERBOSE 8900ef49e9Sdyoungto 9000ef49e9Sdyoung.Xr reboot 2 . 9100ef49e9Sdyoung.It Fl x 9200ef49e9SdyoungTo enable debugging messages on the console, pass the 9300ef49e9Sdyoung.Xr boothowto 9 9400ef49e9Sdyoungflag 9500ef49e9Sdyoung.Dv AB_DEBUG 9600ef49e9Sdyoungto 9700ef49e9Sdyoung.Xr reboot 2 . 9800ef49e9Sdyoung.It Fl z 9900ef49e9SdyoungTo silence some shutdown messages on the console, pass the 10000ef49e9Sdyoung.Xr boothowto 9 10100ef49e9Sdyoungflag 10200ef49e9Sdyoung.Dv AB_SILENT 10300ef49e9Sdyoungto 10400ef49e9Sdyoung.Xr reboot 2 . 105bc0a5a65Smycroft.It Fl q 106bc0a5a65SmycroftDo not give processes a chance to shut down before halting or restarting. 107bc0a5a65SmycroftThis option should not normally be used. 108369451e4Scgd.El 109369451e4Scgd.Pp 1107a2d8df5SuweIf there are any arguments passed to 1117a2d8df5Suwe.Nm reboot 1127a2d8df5Suwethey are concatenated with spaces and passed as 1137a2d8df5Suwe.Fa bootstr 114322ddd58Sdhollandto the 1157a2d8df5Suwe.Xr reboot 2 1167a2d8df5Suwesystem call. 1177a2d8df5SuweThe string is passed to the firmware on platforms that support it. 1187a2d8df5Suwe.Pp 119369451e4ScgdNormally, the 120369451e4Scgd.Xr shutdown 8 121369451e4Scgdutility is used when the system needs to be halted or restarted, giving 122369451e4Scgdusers advance warning of their impending doom. 123369451e4Scgd.Sh SEE ALSO 124416a0bcaShubertf.Xr reboot 2 , 125416a0bcaShubertf.Xr syslog 3 , 12613dc9abfSwiz.Xr utmp 5 , 12713dc9abfSwiz.Xr boot 8 , 128322ddd58Sdholland.Xr init 8 , 129ddd1724fSlukem.Xr rescue 8 , 130158fe897Smikel.Xr shutdown 8 , 13113dc9abfSwiz.Xr sync 8 13213dc9abfSwiz.Sh HISTORY 13313dc9abfSwizA 13413dc9abfSwiz.Nm 13513dc9abfSwizcommand appeared in 136*1bfbbe60Ssevan.Bx 4.0 . 13713dc9abfSwiz.Pp 13813dc9abfSwizThe 13913dc9abfSwiz.Nm poweroff 14013dc9abfSwizcommand first appeared in 14113dc9abfSwiz.Nx 1.5 . 142aa62e15eSperry.Sh CAVEATS 143aa62e15eSperryOnce the command has begun its work, stopping it before it completes 144aa62e15eSperrywill probably result in a system so crippled it must be 145aa62e15eSperryphysically reset. 146aa62e15eSperryTo prevent premature termination, the command 147aa62e15eSperryblocks many signals early in its execution. 148aa62e15eSperryHowever, nothing can defend against deliberate attempts to evade this. 149c0e06197Sjnemeth.Pp 150c0e06197SjnemethThis command will stop the system without running any 151c0e06197Sjnemeth.Xr shutdown 8 152723dae14Swizscripts. 153723dae14SwizAmongst other things, this means that swapping will not be 154c0e06197Sjnemethdisabled so that 155c0e06197Sjnemeth.Xr raid 4 156723dae14Swizcan shutdown cleanly. 157723dae14SwizYou should normally use 158c0e06197Sjnemeth.Xr shutdown 8 159c0e06197Sjnemethunless you are running in single user mode. 16025718b84Sis.Sh BUGS 161322ddd58SdhollandThe single user shell will ignore the 162322ddd58Sdholland.Dv SIGTERM 163322ddd58Sdhollandsignal. 16425718b84SisTo avoid waiting for the timeout when 16525718b84Sisrebooting or halting from the single user shell, you have to 16625718b84Sis.Ic exec reboot 16725718b84Sisor 16825718b84Sis.Ic exec halt . 169