14.4. Stopping LinuxNo computer can be turned off the way you turn off other electrical appliances. A Linux computer has running processes and open files, and a sudden loss of power can cause problems in the file system or even hardware failures. You should always gracefully shut down a Linux system. The traditional way to stop a Linux system is to change the run level to 0 (halt). To reboot, change the run level to 6. This can be done on a Linux system with the init and/or telinit commands. However, a more graceful method to stop a Linux system is to use the shutdown utility (Figure 14-2). shutdown can be used to either halt Linux, place it into single-user mode (run level 1), or place it into multi-user mode. It allows the shutdown or reboot to be scheduled at some point in the future and it emits warning messages prior to the shutdown so that users may log out before the system changes state.
|