Shutting Down FreeBSD


FreeBSD (like other versions of UNIX) is a multitasking, multiuser operating system. It is constantly doing something and usually has many files open at the same time. Because of this, you cannot simply turn off the power when you want to shut down a FreeBSD system. First, you have to tell FreeBSD to shut itself down so that it can terminate any programs it is running and save any files it has open in an orderly fashion. The proper way to do this right now is with the following command:

shutdown -h now


This tells FreeBSD to perform a system shutdown, to halt after the shutdown is complete (as opposed to rebooting or going into single-user mode), and that you want the shutdown to happen now instead of five minutes from now, for example. (Usually you put a delay here so that other users will get a warning of the upcoming shutdown and have time to save whatever files they are working on.)

Type shutdown -h now at the prompt and press Enter.

You'll see a few messages on your screen, including Broadcast message from root and various status messages from some processes as they shut down.

Look for the following message:

System halted Please press any key to reboot


Then, and only then, is it safe to turn off your computer.

Caution

Never shut down a FreeBSD system or any other UNIX system by simply turning off the power. Doing so can cause serious damage to the filesystems. You should always issue a proper shutdown first. See Chapter 4, "Booting and Shutting Down FreeBSD," for more information on proper shutdown and reboot techniques.





FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net