April 6, 2011, 7:07 p.m.
posted by homene
Understanding Virtual Consoles
The term console refers to the combination of one input device and one output device designed to enable you to interact with your computer. In real terms, this means a keyboard and a monitor. If you have ever used an MS-DOSonly computer, you should already be familiar with computer use at a console.
In Linux, you also find the term virtual console in common use. This term alludes to the fact that in Linux, several sessions of interactive console work can be active at any time. Each session is referred to as a virtual console; you can switch between these sessions (or virtual consoles) by using special key combinations. This way, you can launch numerous full-screen applications simultaneously and switch between them easily. For example, you might want to have an editor active on one console and a web browser active on another console. In a way, this functionality is similar to the functionality provided by a windowing system, although each virtual console occupies the entire display.
By default, when you install and boot Linux, seven virtual consoles are configured and active. When you begin to use the Linux desktop, as you did in Part III, "Using Linux on the Desktop," you normally see only the seventh virtual console; it is the one on which the X Window System (the engine of the Linux desktop) runs. Consoles one through six do not, by default, run graphical applications or environments but are instead configured to allow you to log in and perform text-based command-line work.
Switching Between Consoles
To display a specific console in Linux, hold down the Ctrl and Alt keys simultaneously with one hand, and with your other hand, press F1 through F7, depending on the console you would like to view. F1 displays console one; F2, console two; and so forth. At the moment, the first six consoles should all be identical. Holding down Ctrl and Alt and pressing F7 displays console seven and the Linux desktop once again.
Logging In at a Virtual Console
To log in to a text-based console, switch to one of the first six virtual consoles by holding down Ctrl and Alt and then pressing the matching function key. When the console appears, you see a banner displaying the operating system name and version and a login prompt, as shown in Figure.
1. After switching to one of the first six virtual consoles, you see a text-based Linux login prompt.
To log in, enter your usernamethe same username you routinely use to log in at the desktop login promptand press Enter. Do not use the root account to log in; you should use the root account only for administration, never for day-to-day computing. When the Password: prompt appears, type your password and press Enter. As a security measure, the password characters you type will not appear on the screen. After you correctly enter your password, you are logged in, as shown in Figure.
2. After you log in, a command prompt is displayed. You can use this command line in all the same ways that you used the command line in the Terminal application in Chapter 6.
The last line displayed, the line ending with a dollar sign ($), is the command prompt, as you learned in Chapter 6. The command prompt in a virtual console provides all the same functionality. Whenever it appears in a virtual console followed by a blinking underline called the cursor, the shell is ready to accept your commands.