[CS Dept logo]

Com Sci 501
System Administration in Linux

[back] Department of Computer Science
[] The University of Chicago



Local Documentation

Escaping When Linux is Stuck

Shutting Down and Rebooting Linux

When things are all messed up, and also after certain changes to the system, you need to shut down the system or to reboot it. Since the Linux file system keeps some state in volatile RAM memory, a sudden shutdown/reboot can leave the disk in an inconsistent state. At best this causes a waste of time checking and re-establishing consistency; at worst you may lose data.

The methods for rebooting the system, in decreasing order of desirability, are:

    • Become root, by logging in, or executing su root.
    • Execute shutdown -r now.
    • (Instead of now, you may set a time delay. Do man shutdown to learn the variations.)
    • Type [CTL]-[ALT]-[F1] or [CTL]-[ALT]-[F2] or ... or [CTL]-[ALT]-[F6] simultaneously to get a new virtual console.
    • Log in as root.
    • Execute shutdown -r now.
    • Type [CTL]-[ALT]-[DEL] simultaneously.
    • Press the RESET button on your computer.
    • Turn off the power to your computer.
    • Turn on the power to your computer.

The methods for shutting down the system, in decreasing order of desirability, are:

In both lists, methods 1-2 allow the file system to synchronize, and should not damage it. Applications that are running when you shut down or reboot may lose information, but our reference system contains mostly applications that are fairly robust under shutdowns and reboots. Method 3 appears to be safe in Linux, but some other versions and variants of UNIX may fail to synchronize on [CTL]-[ALT]-[DEL], so it's not a good habit to form. The impact of the RESET button (method 4) depends on your computer and its system. At best it is very risky. Turning off power (method 5) is almost guaranteed to damage the file system, causing at least a lengthy fsck operation to repair consistency when you reboot, and possibly losing some data. Books and manuals tell us never to turn off power. But, you will probably get stuck in situations where nothing else works. I have toggled power to reboot many times, and it is always scary, but I've never actually lost data.


Michael J. O'Donnell
Last modified: Sun Sep 14 17:48:25 CDT