pavement

Shutdown

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
Line 2: Line 2:
  
 
==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 -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.
  
Compare to [[init]]
+
'''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, and at that time will forcefully log them out, halt the system, and automatically reboot.
 +
 
 +
Compare to [[init]].
 +
 
 +
[[Category:System Commands]] [[Category:Common Tasks]]

Revision as of 09:08, 14 September 2004

Used to shutdown a machine. shutdown requires two arguments: a command and a time.

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 -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, and at that time will forcefully log them out, halt the system, and automatically reboot.

Compare to init.

Personal tools