Linux Unleashed, Third Edition:Getting Started
-->
Previous
Table of Contents
Next
Virtual Terminals
Linux, as mentioned earlier, is a multiuser, multitasking system. This means that more than one login can access the system at the same time and that each login can be doing one or more different things all at the same time. A serious multiuser system has several terminals (consisting of a keyboard and a display screen) wired or networked to the main computer unit.
Although you probably dont have any terminals attached to your system, you can still log in several times under the same or different login names using your single keyboard and screen. This magic is performed by using virtual terminals which allow your single screen and keyboard to act like a dozen different terminals, each identified by one of the function keys located at the top of your keyboard.
As an example, press Alt+F2. When you do, everything on your screen should disappear, to be replaced by the following:
Welcome to Linux 1.2.13
darkstar login:
Log in with your regular login (not root). When the shell prompt is displayed, type who at the prompt and press Enter. You should see something similar to the following:
darkstar:~$ who
fido tty2 Dec 14 01:42
fido tty1 Dec 14 01:40
When you run the Linux command who, your screen displays the names of all logins currently logged into the system, where they are logged in from, and when they logged in. (Your login name appears, of course, instead of fido in the preceding example.)
By convention, tty1 is the main console screen. It is the normal screen that appears after Linux has started up (unless you start up with a windowing interface), so you dont have to do anything special to get it. If you have switched to any other virtual consoles, you can return to tty1 by pressing Alt+F1.
So you want to know how many virtual screens are active on your system? Try going through all the Alt+Fn keys. Alternatively, on some systems you can scroll through the virtual screens by using the Alt+right arrow combination to move up through the screens or Alt+left arrow to move down. Most Linux systems start with either six, ten, or twelve virtual consoles defined. You can change this number, but youll probably never use more than three or four, so the default is fine.
Why bother with virtual consoles? Quite often you find yourself doing somethingperhaps in a long and complicated programand realize that you should have done something else first. Simply flip to another virtual terminal and do whatever it is. Its as if you have two terminals running at the same time.
Another handy use of virtual terminals is when, through experimentation or otherwise, your screen locks up or starts displaying strange symbols when you hit a key. From a different virtual terminal, you can try to troubleshoot the problem or restart the system, if necessary.
Linux also comes with a very powerful multitasking windowing environment called X. Installing and running X window systems is described later in this book (see Chapter 22, Installing and Configuring XFree86).
Commands and Programs
Run the who command and Run who are much more common ways of saying Type who at the prompt and press Enter. We use the shorter expressions wherever their meaning is clear. Sometimes people familiar with Linux drop the word run so that one user might tell another, I tried who but didnt see anything unusual. Its understood by the context that when they tried who, they actually ran it.
Something else you may notice if you are reading carefully is that there seems to be both Linux programs and Linux commands. A command is that which you type at the shell prompt. For this reason, the combination of the shell prompt and what you type after it is often called a command line. When you press the Enter key, Linux takes the command youve entered and tries to perform it. The Linux system has built-in responses to some commands; for other commands, it finds the appropriately named program on your hard disk and executes that program.
In the strictest sense, then, the command is what you type, and the program is what performs your command. However, very simple programs with straightforward results, such as who, are often referred to as commands, although there is actually a who program on your hard disk. More complicated programs, usually interactive ones such as adduser or open-ended ones such as a text editor, are called programs in the more traditional sense. So you might hear one experienced user tell another, The adduser program worked fine. I tried the who command 15 minutes later and the new user had logged in already.
Summary
In this chapter, we assigned a password to the root login and created a new user ID to be used in the next few chapters. We learned some useful Linux terminology tips that will serve us well in the future. At this point, you can either ensure that you have logged out of all virtual terminals or simply move on to the next chapters.
There are a number of chapters that explain in detail what weve just covered, and you may want to read them right now for more information:
To learn more about Linux commands youll use on a regular basis, see Chapter 7, Basic Linux Commands.
To learn more about the Bourne Again Shell that you use by default, see Chapter 11.
And to learn more about file permissions and the way they affect which files you can read, see Chapter 9.
Previous
Table of Contents
Next
Wyszukiwarka
Podobne podstrony:
122 124highwaycode pol a4 w trakcie szkolenia (str 122 124)312[01] 03 122 Karta pracy egzaminacyjnejTNC 122 manual guide124 10 (3)1223456789NOWE PRAWO z 29 czerwca 11 (nr 124)więcej podobnych podstron