shutdown is the general, all-purpose command used
to halt or reboot the system. As root, you can
issue the command:
/sbin/shutdown -r +10
to cause the system to reboot in 10 minutes. The -r
switch indicates the system should be rebooted after shutdown, and
+10 is the amount of time to wait (in minutes)
until shutting down. The system will print a warning message to all
active terminals, counting down until the shutdown time. You can add
your own warning message by including it on the command line, as in:
/sbin/shutdown -r +10 "Rebooting to try new kernel"
You can also specify an absolute time to shutdown, as in:
/sbin/shutdown -r 13:00
to reboot at 1:00 pm. Likewise, you can say:
/sbin/shutdown -r now
to reboot immediately (after the safe shutdown process).
Using the -h switch instead of -r
will cause the system to simply be halted after shutdown; you can
then turn off the system power without fear of losing data. If you
specify neither -h nor -r, the
system will go into single-user mode.