NEXT UP previous
Next: The File Hierarchy

Logging In

To start off with, your Linux system should present you with an invitation to login, in the form of a login prompt:

	login:

Here you type in your user name and press Enter or Return. If a password has been set on your account, the system will respond with:

	Password:

as a prompt for you to enter your password, again followed by Enter or Return. The characters you type for your password will not be visible on the screen. If your login name and password are correctly entered, the system will return with a prompt inviting you to enter commands. If you have made any mistakes the system responds with the message:

	Login incorrect

and issues a new login prompt for you to try again. A word of warning here - if you are the system administrator for your machine as well as being a new user, you should avoid using your root login account unless you need to perform an administrative task that absolutely requires its use. The reasoning behind this is that root is a privileged login with great power for overriding the normal Linux system security and integrity checks. Even for experienced administrators, accidentally making time consuming and/or costly errors is very easy.

Another point to mention here is that Linux (in common with most UNIX-like systems) is case sensitive, so that lower case letters and their upper case equivalents are treated as separate characters. In most cases, Linux expects you to type in lower case words and commands and in these cases the upper case versions just won't work.

For an ordinary user account, when you login successfully, the system will execute a program called the shell. Any program, while it is executing within the system, is called a process. And it is your shell process that is responsible for giving you a command line prompt. By default, the prompt for a non-privileged user is a dollar ($) symbol, and for a system privileged (root) user it is a hash (#) symbol. The shell is also responsible for taking in any commands you type at the keyboard and arranging for them to be executed.

In fact, for historical reasons, there are several different shells available which all offer roughly the same facilities. However, in this book, I shall concentrate on the Free Software Foundation (GNU) shell, called bash, which is the default shell used in most Linux distributions anyway.

Once you have a shell prompt, you can enter the names of commands, along with any parameters required by the commands, and the shell will execute them. If a command takes a long time to run or generates a lot of output to the screen, you may want to interrupt it and stop it before it has finished. To most commands, you can send an interrupt signal from the keyboard by pressing Ctrl-c (i.e. by pressing the C' key while you are already holding the 'Ctrl' key down).

When you have finished your login session, you can logout by entering the command logout at the shell prompt. There are other ways to logout, the most common being to send end-of-file (EOF) to the shell at the prompt. This is done from the keyboard by pressing Ctrl-d. The problem here is that the shell can be set up to ignore EOF and in some Linux distributions this is done by default. Later on, when we look at the shell in more detail, you will see how to customise some of the ways in which the shell responds.


NEXT UP previous
Next: The File Hierarchy