Originally Published: Tuesday, 12 June 2001 Author: Michael Stutz
Published to: learn_articles_firststep/General Page: 1/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.

Introduction   Page 1 of 5  >>

No Starch Press provides the follow excerpt from soon to be released Linux Cookbook by Michael Stutz to the Linux.com community. All rights reserved. Used with permission.

Read more about the The Linux Cookbook

Don't miss the Linux.com Live! Event with author Michael Stutz. Stutz will be available to answer all your questions on Tuesday June 12th at 11:00 am PDT.

This chapter concerns those concepts and commands that every Linux user knows--how to start and stop the system, log in and out from it, change your password, see what is happening on the system, and use the system help facilities. Mastery of these basic concepts is essential for using Linux with any degree of success.

Some of these recipes make reference to files and directories; these concepts are explained in Chapter 5 Fiiles and Directories, page 65.

2.1 CONTROLLING POWER TO THE SYSTEM

These recipes show how to start and stop power to the system--how to turn it on and turn it off. It's more than just pressing the button on the case; in particular, there is a right way to turn off the system, and doing it wrong can result in losing some of your work. Fortunately, there isn't any black magic involved, as we soon shall see--properly shutting down the system is easy!

2.1.1 POWERING UP THE SYSTEM

The first thing you do to begin using the system is start power to it. To power up the system, just turn it on. This is called booting the system.

As the Linux kernel boots there will be many messages on the screen. After a while, the system will display a login: prompt. You can now log in. See Recipe 2.2.1 Loggin In to the System, page 18.

Some systems are configured to start xdm at boot time (see Recipe 4.1.1 Starting X, page 53). If your system is configured like this, instead of the login: prompt described above, you'll see a graphical screen with a box in the middle containing both login: and Password: prompts. Type "Ctrl"-"Alt"-"F1" to switch to the first virtual console, where you can log in to the usual way (see Recipe 2.3 Console Basics, page 20).

2.1.2 SHUTTING DOWN THE SYSTEM

You can't just flip the power switch when you are done using the computer, because Linux is constantly writing data to disk. (It also keeps data in memory, even when it may have appeared to have written that data to disk.) Simply turning off the power could result in the loss or corruption of some of your work.

To turn off a single user system, first log out of all consoles (discussed in Recipe 2.3 Console Basics, page 20). Then type "Ctrl"-"Alt"-"F1" (press and hold these three keys at once). {FOOTNOTE: If your keyboard has two "Alt" and "Ctrl" keys, use the left set of these keys}

The system will print some messages as it shuts down, and when you see the line, 'Rebooting...', it's safe to turn the power to the machine off.

NOTE: You don't want to wait too long after you see this message; if left untouched, the system will reboot and you'll be back to the beginning!

2.2 ACCOUNTS AND PRIVILEGES

Linux is a multi-user system, meaning that many users can use one Linux system simultaneously, from different terminals. So to avoid confusion (and to maintain a semblance of privacy), each user's workspace must be kept separate from the others.

Even if a particular Linux system is a stand-alone personal computer with no other terminals physically connected to it, it can be shared by different people at different times, making the separation of user workspace still a valid issue.

This separation is accomplished by giving each individual user an account on the system. You need an account in order to use the system; with an account you are issued an individual workspace to use, and a unique username that the system (and those who use it) will then forever know you as; it's a single word, in all lowercase letters.

During this installation process, the system administrator should have created an account for you. (The system administrator has a special account whose username is root; this account has total access to the entire system, so it is often called the superuserm.)

Until the mid-1900s it was widely common for usernames to be the first letter of your first name followed by your entire surname, up to 12 characters total. So for example, user Samuel Clemens would have a username sclemens by this convention; this, however, is not a hard and fast rule, especially on home systems where you may be the only user. Sometimes, a middle initial may be used ("dkjohnson"), or sometimes even nicknames or initials are used ("zenboy," "xibo"). But whatever username you pick for yourself, make sure it's one you can live with, and one you can stand being called by both the system and other users (your username also becomes part of your email address, as we'll see in Chapter 30 Email, page 315).

In addition to your username, you should also have a password that you can keep secret so that only you can use your account. Good passwords are strings of text that nobody else is likely to guess (i.e., not obvious words like 'secret', or identifying names like 'Ruski', if that happens to be your pet cat). A good password is one that is highly memorable to you so that you don't have to write it down, but is enough in construction so that anyone else couldn't ever guess it. For example, 't39sAH' might be a fine password for someone whose first date was to see the movie The 39 Steps directed by Alfred Hitchcock.

NOTE: While usernames are always in lowercase, passwords are case sensitive; the passwords 'Secret', 'secret', and 'SECRET' are all considered different.





Introduction   Page 1 of 5  >>