Next Up Previous Contents Index
Shutting Down

1.7 Shutting Down

Some day, computers will probably be as easy to use as televisions are today (no, we're not there yet...). Maybe we'll have remote controls to navigate easily between features and to turn off the machine.

At present, though, you can't simply turn off your computer when you're finished. You can always log out from your account, which will return you to your login screen, but if you want to completely shut off your machine, you've got a couple more steps to take.

Figure 15: The command `top' shows you running processes

Here's why: Even though you may not be typing, listening to music or browsing with Netscape, your machine is still working on a variety of processes in the background. (A process is a program which is being executed. Multiple processes are running all the time on your system.)

  • Tip: Curious to take a peek? Just go to a shell prompt and type top. You'll see the processes that are currently running (see Figure 15). To quit this view, type [Q].

    (To learn more about the top command, type man top at the shell prompt; to move forward a screen, press the [Spacebar]; to move back a screen, press [B]; to quit, press [Q]. You'll learn more about these ``man pages'' later in this chapter.)

  • Like a faithful assistant, your Linux system is carrying out tasks silently all the time. You can't just turn out the lights and lock the door on your assistant. Instead, you've got to give them time to put away their work and make sure everything's in its proper place before saying ``good night.''

    To shutdown or reboot while you're in GNOME, exit from your X session (panel -> Log out). Once you're at the login screen, left-click on Options, and select Halt or Reboot.

    You'll then be asked whether you want to stop or restart your machine. Choose Halt to shutdown your machine; chooseRestart to restart, or ``reboot'' your machine.

    Figure 16: The shutdown command at the shell prompt

    At the shell prompt, you can reboot or halt your system from your root account.

    To reboot from the prompt, type:

    shutdown -r now
    

    (See Figure 16.)

    Or, if you want to exit from your system and turn off your machine, type:

    shutdown -h now
    

    The -r option stands for ``reboot,'' while the -h option means ``halt.'' Stating now means that you want to perform this action immediately.

    Please Note: Remember to save your work and exit from any applications which may be running before you perform a shutdown from the shell prompt, because you could lose work.

    If you choose to halt the system, you'll see a list of messages about which services are stopping; then, you'll see:

    The system is halted
    

    Now everything's put away and it's safe to turn off your computer.

  • Tip: Try substituting +5 for now; you'll find that you've just commanded your assistant to put everything away and stop working in five minutes.

  • You can learn more about the shutdown command by typing:

    man shutdown
    

    at a shell prompt. You'll be presented with a ``man page,'' which will tell you about this command.

    To go forward a screen, press the [Spacebar]; to go back a screen, press [B]; and to quit, press [Q].

  • Summary: To shutdown or reboot from GNOME, from the log in screen, go to Options -> Halt or Reboot. From the shell prompt: Log in as root, and type shutdown -r now (to reboot) or shutdown -h now (to halt).


  • Next Up Previous Contents Index