Starting and Stopping Linux


This sounds like such a simple thing that you might wonder why I am spending any time on it at all. After all, you turn on the power switch, sit back, and watch Linux come to life. Depending on the installation, you may have more than one boot option. The default will almost certainly be to take you into Linux. If you opted for a dual-boot system, you may have to select Linux from the boot menu.

The lesson here is simply this: Because you do have options, take the time to read what's on the menu and go with that.

Warning

All right. Here is rule number one when it comes to shutting down your system: Never, ever simply power off the system. You must do a proper shutdown. Oh, and get an uninterruptible power supply (UPS) so that your system doesn't shut down accidentally. I should perhaps make it clear that you do not need a UPS to run Linux. However, if you don't want a random power fluctuation or a three-second power outage to take down your system, the added protection of a UPS just makes sense.


Linux is a multiuser, multiprocessing operating system. Even when it appears that nothing is happening, a great deal can be going on. Your system is maintaining disk space, memory, and files. All this time, it is busy making notes on what is happening in terms of security, e-mail, errors, and so on. There may be open files or jobs running. A sudden stop as a result of pulling the plug can damage your file systems. A proper shutdown is essential. Even in the world of your old OS, you still had to do a proper shutdown it is no different here.

There are a few ways of shutting down your system. You start by logging off from your system. Make sure you've closed all your applications and saved anything you might have been working on. Now right-click on the desktop and select Logout from the pop-up menu. You should get something that looks similar to the screen shown in Figure B-5.

Figure B-5. Here are the available options when preparing to end a login session.


This particular logoff screen is from a SuSE system, but the types of options will be similar regardless of what system you are on. At this point, select "Turn off computer." There's rarely any need for a "Restart computer" in the Linux world when you shut down, it's usually because you intend to power off the system.

Shell Out

You can also log out from the command line, but it must be done from the root login. From a terminal window, switch to root with "su - root" (you'll be prompted for the password), and type the following:

shutdown -h now

When shutdown is called with the -h option, it is another way of saying, "Shut the system down and keep it down." On some systems (and with proper hardware), this option will power off the system after it is down: Another option is to type the following:

shutdown -r now

The -r option tells Linux to reboot immediately after a shutdown. A reboot option is usually used after a kernel rebuild.




Moving to Linux(c) Kiss the Blue Screen of Death Goodbye!
Moving to Linux: Kiss the Blue Screen of Death Goodbye!
ISBN: 0321159985
EAN: 2147483647
Year: 2003
Pages: 247

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net