[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Tuesday, 12 June 2001 | Author: Michael Stutz |
Published to: learn_articles_firststep/General | Page: 2/5 - [Printable] |
The Linux Cookbook: Chapter 2, WHAT EVERY LINUX USER KNOWS
Today's Learn article derived from Chapter Two of the
soon to be published Linux Cookbook contains a ton
of useful information for the new user. Learn all kinds of useful
commands and short-cuts for basic system operation, and then join
author Michael Stutz as he answers your questions live in Linux.com
Live! Linux.com would like to thank publisher Bill Polluck of No Starch Press for the free use of
this material.
|
Logging Into the System | << Page 2 of 5 >> |
2.2.1 LOGGING IN TO THE SYSTEMTo begin a session on a Linux system, you need to log in. Do this by entering your username at the login: prompt on your terminal, and then entering your password when asked. The login: prompt appears on the terminal after the system boots. If your system is configured to start the X Window System at boot time, you'll be presented with an X login screen instead of the standard login prompt. If that happens, press "Ctrl"-"Alt"-"F1" to switch to the text login screen; this is explained further in Recipe 2.3 Console Basics, page 20. A typical login: promt looks like this:
Every Linux system has its own name, called the system's
hostname; a Linux system is sometimes called a host, and it
identifies itself with its hostname at the login: prompt. It's
important to name your system--like a username for a user account,
a hostname gives name to the system you are using (and it becomes
especially important when putting the system on a network). The
system administrator usually names the system when it is being
initially configured (the hostname can always be changed later; its
name is kept in the file In this example, 'bardo' is the hostname of this particular Linux system. The name of the terminal is 'ttyl', which means that this is the first terminal on this particular system. (Incidentally, 'tty' is short for "teletype," which historically was the kind of terminal hardware that most Unix-based systems used by default.) To log in to the system, type your username (followed by "Ret") at the login: prompt, and then type your password when asked (also followed by "Ret"); for security purposes, your password is not displayed on the screen when you type it.
Once you've entered your username and password, you are "logged in" to the system. You can then use the system and run commands. As soon as you log in, the system displays the contents of
The dollar sign ('$') displayed to the left of the cursor is called the shell prompt; it means that the system is ready and waiting for input. (You can change this prompt to any text of your liking; to learn how, see Recipe 3.6.1 Changing the Shell Prompt, page 46.) By default, the shell prompt includes the name of the current directory, which it places to the left of the '$' character. The tilde charater ('~'), is a shell symbol that denotes the user's home directory--when you log in, you are in your home directory (these terms are defined in Chapter 5 [Files and Directories], page 65). 2.2.2 LOGGING OUT OF THE SYSTEMTo end your session on the system, type logout at the shell prompt. This command logs you out of the system, and a new login: prompt appears on your terminal.
$ logout "Ret" What works equally well to typing the logout command is to
just type C-d (hold down "Ctrl" and type a d). You don't even have
to type "Ret" afterwards. Many users prefer this quick shortcut.
Logging out of the system frees the terminal you were using--and ensures that nobody can access your account from this terminal. If you are the only person using your system and have just ended a session by logging out, you might want to power down the system. See Recipe 2.1.2 Shutting Down the System, page 17, earlier in this chapter.
| |
Logging Into the System | << Page 2 of 5 >> |