Free Hosting Online for WorkStations

< Previous | Contents | Next >

Shutting Down The System

The process of shutting down the system involves the orderly termination of all the pro- cesses on the system, as well as performing some vital housekeeping chores (like syncing


all of the mounted file systems) before the system powers off. There are four commands that can perform this function. They are halt, poweroff, reboot, and shutdown. The first three are pretty self-explanatory and are generally used without any command line options. For example:



[me@linuxbox ~]$ sudo reboot

[me@linuxbox ~]$ sudo reboot


The shutdown command is a bit more interesting. With it, we can specify which of the actions to perform (halt, power down, or reboot), and provide a time delay to the shut- down event. Most often it is used like this:



[me@linuxbox ~]$ sudo shutdown -h now

[me@linuxbox ~]$ sudo shutdown -h now


to halt the system, or like this:



[me@linuxbox ~]$ sudo shutdown -r now

[me@linuxbox ~]$ sudo shutdown -r now


to reboot the system. The delay can be specified in a variety of ways. See the shutdown man page for details. Once the shutdown command is executed, a message is “broad- cast” to all logged-in users warning them of the impending event.


Top OS Cloud Computing at OnWorks: