Accessing Your Linux System

 < Day Day Up > 



To access and use your Linux system, you must carefully follow required startup and shutdown procedures. You do not simply turn off your computer. If you have installed the boot loader GRUB, when you turn on or reset your computer, the boot loader first decides what operating system to load and run. GRUB will display a menu of operating systems to choose.

If, instead, you wait a moment or press the ENTER key, the boot loader loads the default operating system. If a Windows system is listed, you can choose to start that instead.

You can think of your Linux operating system as operating on two different levels, one running on top of the other. The first level is when you start your Linux system, and where the system loads and runs. It has control of your computer and all its peripherals. You still are not able to interact with it, however. After Linux starts, it displays a login screen, waiting for a user to log in to the system and start using it. You cannot gain access to Linux unless you log in first.

You can think of logging in and using Linux as the next level. Now you can issue commands instructing Linux to perform tasks. You can use utilities and programs such as editors or compilers, or even games. Depending on a choice you made during installation, however, you may be interacting with the system using either a simple command line interface or the desktop directly. There are both command line login prompts and graphical login windows. Red Hat will use a graphical interface by default, presenting you with a graphical login window at which you enter your username and password. If you choose not to use the graphical interface, you are presented with a simple command line prompt to enter your username.

The Display Manager: GDM

With the graphical login, your GUI interface starts up immediately and displays a login window with boxes for a username and password. When you enter your username and password and then press ENTER, your default GUI starts up. On Red Hat, this is GNOME by default.

For Red Hat, graphical logins are handled by the GNOME Display Manager (GDM). The GDM manages the login interface along with authenticating a user password and username, and then starting up a selected desktop. If problems ever occur using the GUI interface, you can force an exit of the GUI with the CTRL-ALT-BACKSPACE keys, returning to the Login screen (or the command line if you started your GUI from there). Also, from the GDM, you can shift to the command line interface with the CTRL-ALT-F1 keys, and then shift back to the GUI with the CTRL-ALT-F7 keys.

When the GDM starts up, it shows a login window with a box for login. Four pop-up menus are located at the bottom of the screen, labeled Session, Language, Shutdown, and Restart. To log in, enter your username in the box labeled Username and press ENTER. You are prompted to enter your password. Do so, and press ENTER. By default, the GNOME desktop is then started up.

When you log out from the desktop, you return to the GDM login window. To shut down your Linux system, click the System menu to display the entry Reboot or Shutdown. Select Shutdown to shut down your system. Alternatively, you can also shut down when you log out from GNOME. GNOME will display a logout screen with the options Logout, Shutdown, or Reboot. Logout is the default, but selecting Shutdown will also shut down your system. Selecting Reboot will shut down and restart your system. (You can also open a terminal window and enter the shutdown, halt, or reboot command as described in the next section; halt will log out and shut down your system.)

From the Session menu, you can select the desktop or window manager you want to start up. Here you can select KDE to start up the K Desktop, for example, instead of GNOME. On Red Hat, both KDE and GNOME will use an interface with a Bluecurve look and feel, appearing much the same. The Language menu lists a variety of different languages that Linux supports. Choose one to change the language interface.

Accessing Linux from the Command Line Interface

For the command line interface, you are initially given a login prompt. The system is now running and waiting for a user to log in and use it. You can enter your username and password to use the system. The login prompt is preceded by the hostname you gave your system. In this example, the hostname is turtle. When you finish using Linux, you first log out. Linux then displays exactly the same login prompt, waiting for you or another user to log in again. This is the equivalent of the login window provided by the GDM. You can then log into another account.

Fedora Core release 1 Kernel 2.4.22-1 on an i686     turtle login:

Logging In and Out

Once you log in to an account, you can enter and execute commands. Logging in to your Linux account involves two steps: entering your username and then entering your password. Type in the username for your user account. If you make a mistake, you can erase characters with the BACKSPACE key. In the next example, the user enters the username dylanp and is then prompted to enter the password:

Fedora Core release 1 Kernel 2.4.22-1 on an i686     turtle login: dylanp Password: 

When you type in your password, it does not appear on the screen. This is to protect your password from being seen by others. If you enter either the username or the password incorrectly, the system will respond with the error message "Login incorrect" and will ask for your username again, starting the login process over. You can then reenter your username and password.

Once you enter your username and password correctly, you are logged in to the system. Your command line prompt is displayed, waiting for you to enter a command. Notice the command line prompt is a dollar sign ($), not a number sign (#). The $ is the prompt for regular users, whereas the # is the prompt solely for the root user. In this version of Linux, your prompt is preceded by the hostname and the directory you are in. Both are bounded by a set of brackets.

[turtle /home/richlp]$

To end your session, issue the logout or exit command. This returns you to the login prompt, and Linux waits for another user to log in.

[turtle /home/richlp]$ logout 

Shutting Down Linux

If you want to turn off your computer, you must first shut down Linux. If you don't shut down Linux, you could require Linux to perform a lengthy systems check when it starts up again. You shut down your system in one of two ways. First, you log in to an account and then enter the halt command. This command will log you out and shut down the system.

$ halt 

Alternatively, you can use the shutdown command with the -h option. With the -r option, it shuts down the system and then reboots it. In the next example, the system is shut down after five minutes. To shut down the system immediately, you can use +0 or the word now (see Chapter 28 for more details).

 # shutdown -h now 
Tip 

Shutting down involves a series of important actions, such as unmounting file systems and shutting down any servers. Never simply turn off the computer.

You can also force your system to reboot at the login prompt, by holding down the CTRL and ALT keys and then pressing the DEL key (CTRL-ALT-DEL). Your system will go through the standard shutdown procedure and then reboot your computer.

Starting a GUI from the Command Line

Once logged into the system, you have the option of starting an X Window System GUI, such as GNOME or KDE, and using it to interact with your Linux system. In Linux, the command startx starts the X Window System along with a GUI, which then enables you to interact with the system using windows, menus, and icons. The startx command starts the GUI desktop by default. Once you shut down the GUI interface, you will return to your command line interface, still logged in. On Red Hat, you can use the Desktop Switcher while in your desktop to switch between GNOME or KDE. The Desktop Switcher is accessible from the Extra System Settings menu as Desktop Switching Tool, or with the switchdesk command. You make your selection and then quit the desktop to return to the command line interface. When you start up the GUI again, the desktop you selected is used.



 < Day Day Up > 



Red Hat(c) The Complete Reference
Red Hat Enterprise Linux & Fedora Edition (DVD): The Complete Reference
ISBN: 0072230754
EAN: 2147483647
Year: 2004
Pages: 328

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