pavement

Shutdown

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Used to shutdown a machine. [[shutdown]] requires two arguments: a command and a time.
+
Used to shutdown a machine. [[shutdown]] requires two arguments: a command and a time. By default, this command is only available to [[root]] and to the members of the '''operator''' group.
  
 
==Common Flags and arguments==
 
==Common Flags and arguments==
  -h will halt the machine
+
  '''-h''' will halt the machine
  -r will reboot the machine
+
  '''-r''' will reboot the machine
  -k will send out a message that the machine will reboot, but not actually do it
+
  '''-p''' will turn the power off after shutdown (only works on some BIOSes)
 +
'''-k''' will send out a message that the machine will reboot, but not actually do it
 
   
 
   
  now is a valid time
+
  '''now''' is a valid keyword for the "time" argument.
  
shudown -h now will halt the machine immediately; all pending writes performed, all disks sync'd and all users will be logged out
+
'''shutdown now''' prevent further logins, notify users of the impending (immediate) stop, halt most daemons, drop to [[single-user mode]].
  
Compare to [[init]]
+
'''shutdown -h now''' will halt the machine immediately - all users will be logged out forcefully, all pending writes will be performed, all disks sync'd, and the system will halt and wait for reboot.
 +
 
 +
'''shutdown -h +5''' will broadcast a console message to all currently logged in users warning them that the system will shutdown in 5 minutes, at which time it will forcefully log them out and do so.
 +
 
 +
'''shutdown -r 0412310000''' will broadcast a console message warning users of a shutdown at midnight on New Year's Eve of 2004 (remember - that means 24 hours before 2005 arrives, not the minute the ball drops!), and at that time will forcefully log them out, halt the system, and automatically reboot.
 +
 
 +
Compare to [[init]].
 +
 
 +
[[Category:System Commands]] [[Category:Common Tasks]]

Latest revision as of 10:23, 1 May 2007

Used to shutdown a machine. shutdown requires two arguments: a command and a time. By default, this command is only available to root and to the members of the operator group.

[edit] Common Flags and arguments

-h will halt the machine
-r will reboot the machine
-p will turn the power off after shutdown (only works on some BIOSes)
-k will send out a message that the machine will reboot, but not actually do it

now is a valid keyword for the "time" argument.

shutdown now prevent further logins, notify users of the impending (immediate) stop, halt most daemons, drop to single-user mode.

shutdown -h now will halt the machine immediately - all users will be logged out forcefully, all pending writes will be performed, all disks sync'd, and the system will halt and wait for reboot.

shutdown -h +5 will broadcast a console message to all currently logged in users warning them that the system will shutdown in 5 minutes, at which time it will forcefully log them out and do so.

shutdown -r 0412310000 will broadcast a console message warning users of a shutdown at midnight on New Year's Eve of 2004 (remember - that means 24 hours before 2005 arrives, not the minute the ball drops!), and at that time will forcefully log them out, halt the system, and automatically reboot.

Compare to init.

Personal tools