shutdownreboot


shutdown/reboot

There may be a time where you need to shut down your Unix system or reboot it. Although I can vouch from many years of experience that you will reboot Unix or Linux far less than Microsoft Windows, you may still need to shut down your system or reboot it. Unix boots differently than Microsoft Windows. Most Windows operating systems will boot up as a complete unit. In Unix, the kernel loads, and then anything else is loaded around it for use. Unix uses dozens of programs to form what appears to be a huge operating system, when in reality it's all loaded separately as single programs.

Each of these programs might be in the process of modifying, moving, creating, or deleting files at any point in time and cannot be interrupted. If you simply shut off the power to a Unix machine, you interrupt all these processes, and probably destroy any files they were working on at the time. This happens often, and is another reason why it's important that commands like this are restricted to the proper users. Haphazardly shutting off the power to a Unix machine has the potential to completely corrupt the drives, leaving the system unusable. Be careful if you use this command at work. If you are working in your lab, then have fun, and try to create problems so that you can use single-user mode and fsck to fix it.

The shutdown command and a reboot command have obvious goals. These two commands gracefully exit all running software, write out disk-cache information to the drives, and complete their respective tasks. They are restricted to the root user for obvious reasons.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

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