Shutdown/Reboot Introduction _L_i_n_u_x is a multi-tasking/multi-user operating system. Just switching the computer "off" when you are done with it is not acceptable for reliable operation. This is true even if you are the only user, not connected to any network. There are different ways to shutdown or reboot a linux machine, Linuxconf has one dialog driven. 11.. PPrriinncciipplleess Even on a standalone (No network) single user _L_i_n_u_x workstation, different things are happening in the background. Just turning the computer off may interrupt important operations and left the computer in a problematic state (or at least some subsystems). Turning the computer off may cause problems but is most cases won't. It highly depends on what is going on at the precise moment the power is removed. Here is a small list: +o Some editors or office applications are running in different windows or virtual console. Unless you tell them, they won't save the current document. +o You have just save a large document. Linux has not yet written the document to disk even if the editor was told that the document was saved. This _w_r_i_t_e _b_e_h_i_n_d facility greatly enhance disk performance at some price: Turning the computer off any time may loose data. +o Some database are updated by a cron job: Turning the computer off may left the database unusable. 22.. TThhee ddiiaalloogg Here is a description of each fields of the dialog. 22..11.. RReebboooott oorr sshhuuttddoowwnn A radio button lets you select between a reboot or a shutdown. A shutdown perform the same operations as reboot except that it brings the machine to complete endless stop. The only alternative left after that is to turn off the power or use the reset button to restart it. 22..22.. DDeellaayy bbeeffoorree sshhuuttddoowwnn On a multi-user system or a server, it may be wise to let people some time to finish their current task before shutting down the computer. If you just want to shutdown or reboot _N_O_W, then enter 0 here. The number is the amount of minutes between the message broadcast and the effective shutdown. 22..33.. MMeessssaaggee Currently the shutdown feature of _L_i_n_u_x can send a message (a small explanation) on terminals. It is expected that this message will be sent to users of other services (samba for one). You put whatever you want here including nothing. It is simly written to the tty of every user currently logged in. 33.. AAlltteerrnnaattiivvee ttoo tthhiiss ddiiaalloogg There are different ways to shutdown or reboot a linux computer. All are front-ends to the /sbin/shutdown command (This is also true for _L_i_n_u_x_c_o_n_f). 33..11.. ccttrrll--aalltt--ddeell Depressing those three magic keys on the console keyboard do a reboot. This is controlled by /sbin/init and the file /etc/inittab. 33..22.. //ssbbiinn//rreebboooott /sbin/reboot is an alias (indeed a symlink) for /sbin/shutdown -r NOW. 33..33.. //ssbbiinn//hhaalltt /sbin/halt is an alias (also a symlink) for /sbin/shutdown -h NOW. 44.. AAuuttoo ffiillee ssyysstteemm cchheecckk Once the shutdown is done properly, all file systems are unmounted (umount'ed indeed). The root file system is turned into read-only mode. For each filesystems including the root, a _c_l_e_a_n flag is set. This flag is checked at next boot to decide if the each filesystems do need a torough check before completing the boot process. This insure that at least the structure of the filesystems is usable after a hard crash (power failure for one). It does not protect from data loss: A clean shutdown is always a good thing.