-->
Previous Table of Contents Next


Your First Login

In spite of all the warnings about using the root login, let’s log in as root. Because root is the only authorized login on a newly installed Linux system with permission to create other accounts, this is unavoidable. Also, we will be performing a couple of important procedures that require root privileges. However, after this first login, we will create a user ID that can prevent accidental damage to the operating system.

At the login prompt


darkstar login:

type


root

and press the Enter key. When you installed Linux, you may have been asked for a password for the root login or the subject simply may not have come up. If the latter is the case, the root login has no password, so you are not prompted for one. If you did assign a password during installation, type the password at the prompt and press Enter. Don’t forget your root password—if you do, you must reinstall the entire system.


Tip:  
Linux is case-sensitive (as are all UNIX versions). A capital R is, to Linux, a completely different letter from a lowercase r. When you type Linux commands, you must use the proper case or Linux will not understand them. The majority of Linux commands are typed in lowercase. This includes the login root; if you type Root or rOoT, Linux will reject the login. The passwords pepper, Pepper, and PEPPER are all different to Linux, too.

There is one curious exception, though. If you type the login IN ALL CAPITALS, the system will accept it—but from then on, everything on your screen will be in capital letters! This is caused by an operating system code left over from the early days when some terminals had only uppercase letters. Although these terminals are no longer in use, the login program retains this historical curiosity. We advise you not to use capital letters, though, because the system looks very strange when you use it in this mode.


If you mistype your login or your password, Linux will deny you access. Try again. Because you are on the main console, you can try as many times as you want (or until your fingers get sore). Some systems can lock out a terminal after a number of failed login attempts, but the main system console is almost always left for unlimited attempts.

After you have logged in as root, the system starts up a user session for you. At this point, you should see something similar to the following on your screen:


darkstar login: root

Last login: Sun Dec 11 17:26:18 on tty1

Linux 1.2.13 (POSIX).

You have mail.



If it’s Tuesday, this must be someone else’s fortune.

darkstar:∼#

Some systems won’t tell you anything at all when you successfully log in, and all you see is a line with the pound character. In the case of the preceding system, Linux tells you when the login for this user was last used (this information may not appear the very first time you log in), and then provides some version information. Linux also tells you that this login has a mail message waiting to be read. Finally, if games were installed on your system, Linux may give you a witty saying or aphorism (generated by a program called fortune). You may see some combination of the preceding or something entirely different. Linux vendors have customized their systems so much that it’s hard to predict what you’ll see when you log in.

If your system does show it, it is always good practice to scan the line that starts with Last login and check that the time given is correct. This is especially important if your Linux system is accessed by other users or is connected to other systems through modems or a network. If the time given does not look right, it could be that someone is using your login to break into your system or using your username without your permission. To prevent this, change the password. (We’ll show you how to change your password soon.)

Let’s read the mail message that’s waiting for us later, after taking care of some important steps. (If you’re curious, on most systems the mail message is sent by the installation procedure when the operating system is installed and concerns registration matters for Linux.)

Your “fortune” is chosen randomly from a long list, so don’t expect to see the one shown in the previous example. If you didn’t install the games package during the Linux installation routine, you won’t see a fortune. You can install the games package at any time if you really want this feature.

The final line you see on the screen (with the pound sign at the end) is the system prompt. This prompt tells you that Linux is waiting for you to type in your commands—it’s prompting you for input. The system prompt


darkstar:~#

also displays some additional useful information which helps you figure out where you are

  darkstar is the system name.
  The ~ character indicates your location in the file system (explained in Chapter 8, “Using the File System”).
  The # character usually indicates that you’re logged in as root (although the $ sign is used in some operating systems and makes it difficult to quickly ascertain whether you are logged in as root or a regular user). According to UNIX conventions, regular user prompts are either % or $, depending on the shell, while # is reserved for root. These symbols are called shell prompts because they are used by the shell to prompt you for commands.


Previous Table of Contents Next