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:
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.