Red Hat Linux 6.1: The Official Red Hat Linux Getting Started Guide | ||
---|---|---|
Prev | Chapter 2. Welcome to Linux | Next |
Some day, computers will probably be as easy to use as televisions are today.
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.
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 2-14). 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."
You can shutdown or reboot in a couple of ways while you're in GNOME:
From your GNOME session: Click on the Main Menu Button, choose Log out, select Logout, Halt or Reboot. You can also check Save current setup, which will preserve your desktop and running applications for the next time you log in. Before proceeding, you'll be asked to verify your decision by typing in your password. (If you're in your user account, you can type in your user password.)
From the graphical login screen: Go to Options… => System => Halt… or Reboot… You'll be asked whether you're sure you want to halt or reboot the machine. Click on Yes to proceed (a password isn't required).
You can also reboot or halt your system from the shell prompt. In both cases, you'll be asked to provide your password to verify that you want to proceed with your decision.
To reboot from the prompt, type:
shutdown -r now |
Or, if you want to exit from your system and turn off your machine, type:
shutdown -h now |
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 a message similar to:
Power down |
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 |
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 login screen, go to Options => System => Halt or Reboot. From within your X session, go to Main Menu Button => Log out, Reboot or Halt. From the shell prompt: Log in as root, and type shutdown -r now (to reboot) or shutdown -h now (to halt).