Appendix A. Computer Basics

Introduction

Linux is no longer a "hackers'" operating system. People with all levels of computer knowledge can easily use it now. With this in mind, we thought it might be useful to provide some rudimentary computer usage information, covering the very basics of daily computer usage, for the brand-new computer user.

Basic Computer Terminology

applet

a small application or program.

backup

a copy of a file or disk.

boot

to start a computer.

bug

a programming error that keeps a program from working properly.

CD-ROM

an acronym for Compact Disc Read-Only Memory. An optical disc that resembles an audio CD, but holds computer data.

crash

a system malfunction that causes a computer to stop working, requiring a reboot.

cursor

the on-screen pointer, usually controlled by the mouse, sometimes by the directional arrows on the keyboard.

desktop

the entire computer screen, containing icons and menus.

desktop theme

color scheme, background images, and varied borders that you can apply to your desktop and open windows to make them aesthetically pleasing.

disk

A spinning platter made of magnetic or optical material used for storing data.

download

To transfer data from one computer to another.

drag and drop

To move an icon, text, image, or media object from one place to another; to launch an application; place the cursor over an icon, hold down the left mouse button, and move the mouse. Release the button and the icon stays wherever the cursor is. Items can be moved between documents as well as different applications.

drive

A device that spins disks or tapes in order to read and write data (a hard drive, floppy drive, CD-ROM drive, or tape drive).

driver

A file that tells a computer how to communicate with an add-on piece of equipment (like a printer).

hard drive

A large capacity storage device made of a number of disks, housed in a rigid case.

highlight

To select by clicking once on an icon or by dragging the cursor over text in a document.

icon

A graphic symbol for an application, file, folder, or action.

launch

Start an application.

memory

The temporary holding area where data is stored while it is being used or changed; the amount of RAM a computer has installed.

menu

An onscreen list of operations available for selection, listed by topic.

modem

MOdulator-DEModulator. A peripheral device that connects computers to each other for sending communications via telephone lines.

mouse

A pointing device that is used to move a cursor on the computer screen.

operating system

The software that controls the computeras a whole; responsible for scheduling tasks, storage, communication with peripherals, and providing a basic user interface.

peripheral

An add-on component to your computer, such as a printer or scanner.

screen saver

A monitor's screen may damage or burn if it sits idle for too long. A screen saver is an image that moves across the screen to prevent damage. It can be configured to appear after a designated amount of time.

print spooler

A program that stores documents to be printed on the hard drive, freeing some memory so other functions can be performed while printing goes on in the background. Also provides a common place to queue documents to be printed.

RPM

Software files are referred to as RPMs. RPM also stands for Red Hat Package Manager.

save

To write a file onto a disk or hard drive.

scroll

To move the contents of a window to bring hidden items into view.

server

A central computer dedicated to sending and receiving data from other computers on a network.

shut down

To safely turn off a computer without damaging files or losing data.

Web browser

Software used to access the Internet.

How to Cut and Paste Text

To cut and paste text in Red Hat Linux, place the cursor at the beginning of the text you want to cut, hold down the left mouse button, and drag the cursor over the text you are selecting. When all the text you want is highlighted, release the left mouse button.

Now place the cursor on the line where you want to paste the text. Click once on the middle mouse button. The text will appear.

The text will not actually be cut from its original location. If you want it removed, highlight it and press the [Delete] key on your keyboard.

How to Emulate a Three-button Mouse

Red Hat Linux is designed to use a three-button mouse. If you have a two-button mouse, you should have selected three-button emulation during the installation process. If you are using three-button emulation, pressing both mouse buttons at the same time equates pressing the missing third (middle) button.

If you are instructed to click with the mouse on something, that means click the left mouse button. If you need to use the middle or right mouse button, that will be explicitly stated. (Of course, this will be reversed if you have configured your mouse to be used by a left handed person.)

The phrase "drag and drop" may be familiar to you. If you are instructed to drag and drop an item on your GUI desktop, click on the icon in question and hold the mouse button down. While continuing to hold down the mouse button, drag the item (by moving the mouse) to a new location. When you have reached the desired location, release the mouse button to drop the item.

Using Screen Savers and Desktop Themes

Screen savers are not just entertaining, they can also save your monitor from damage. Much like a film strip that burns when it gets stuck in front of the projector's bulb, your monitor can "burn" if it stays on and idle for too long.

You can choose a screen saver and set the amount of time that will pass before it is displayed from your control center. Access the control center from the Settings option on the panel's main menu.

Desktop themes just look nice. They serve no other purpose. Themes combine colors, images, and fonts for display on your desktop, the borders of windows, etc. They look good, but some of the more intricate themes can slow down your computer.

Settings for themes also can be accessed through the control center.

Basic Web Browser Navigation

A Web browser is a program used to view pages on the Internet, such as Mozilla or Netscape. Browsers generally have similar navigational functions. The toolbar on a browser window holds buttons that can take you back and forth between pages you have recently viewed, referesh your screen so the latest information from the website you are visiting is shown, and so on.

There is a field near the top of the screen where you can manually enter a website address, rather than click on a link or do a search. This field is usually labelled with Location, Address, URL, Go To, or something similar. If it is not labelled, it is likely to be the only place near the top of the screen where text can be typed at all.

Figure A-1. Mozilla Web Browser

Most browsers also have a button near the top of the screen where you can add bookmarks. Bookmarks are websites you want to be able to return to quickly and/or often. Once you find a site that you want to bookmark, click on the Bookmark button and select Add bookmark (or similar option). You can also edit bookmarks by selecting Edit (or similar option) after you click on Bookmark.

Generally, the browser you install should have documentation included that explains usage in greater detail.

Email Etiquette

Email is an extremely common tool these days, be it for use at work, home, or elsewhere. It is a very convenient and fast way to communicate with people. Write a letter, click a few buttons, and it is on its way. But there are a few "understood" rules of email etiquette.

For example, many people feel that capitalizing an entire word or phrase indicates anger, as if the writer is yelling at the reader. So unless you really are angry, avoiding using all caps to emphasize a word or phrase. Also, when forwarding or replying to email, it is considerate to delete all the old header information (the addresses and messages from others who may have received this mail prior) from the beginning of the letter so the next recipient does not have to scroll through a bunch of stuff that is irrelevant before they get to the body of the letter.

When using the Reply or Reply All buttons, think about what you are saying and to whom you are saying it. When you receive an email and it is addressed to a number of people, if you hit Reply All and send a response, they all get it. Your response might not be something they all want or need to see. In that case, you can click on Reply All and then go delete certain addresses from the To line of your letter. If you only want to respond to the person who sent the email (the person listed in the From field), click on Reply. When in doubt, look in the To field of your letters before you send them to make sure they are going to the people you intend.

How to Attach a File to an Email

You can attach a file or website to an email without having to cut and paste a lot of text into the body of the letter. Most email tools have an icon in the letter composition window that you can click on to attach something to a letter. The icon often looks like a paperclip. You can also look for an attach option in the outgoing letter's main menu, at the top of its screen, for example, File => Attach.

Figure A-2. Mozilla Composer Buttons

Whether you click on an icon or select attach from the menu, you will be asked what you want to attach (probably a file or website). If you choose file, a dialog box will appear where you can either type the file name manually or select a file by highlighting it. If you choose website, a dialog box will open and you will need to type the URL (address) for the website you want to attach to your email. The page itself will appear in the body of your email. If you only want to send a link to a website, copy and paste the address from the URL field into the body of the letter. You might also be able to go to the main menu at the top of your Web browser and select File => Send Page or Send Link. This will open an email composition screen. If you select Send Page, the page itself will appear in the body of the letter. If you select Send Link, a link to the website appears in the body of the letter.

Creating Files and Directories

You can create a file with a graphical user interface, or you can do it a lot faster in a shell prompt. To create a file with a GUI, in GNOME, open the file manager, found in the main menu. Select the directory where you want to store the file from the tree list on the left. Then go to File => New => File on the main menu. A text editor window should appear on your screen, probably Emacs. You can type your text in this window and then go to Files => Save Buffer As on the main menu.

In KDE, go to Main Menu => Home Directory. This opens Konquerer, KDE's file manager and Web browser. Select Edit => Create New and then choose directory, text file, or HTML file. A dialog box opens where you can name the file or directory. If you want to create a file within a specific directory, highlight that directory in the Konquerer window before you select Edit => Create New.

After you create an empty file or directory, it appears in the Konquerer window. You can open a file and begin entering content by highlighting it and then selecting Location => Open With and then selecting the tool you want to work in.

You can also open a text editor and just make the file without going through either of the file managers. Just open Emacs by going to Main Menu => Programs => Applications => Emacs on the main menu. Now in Emacs, go to Files => Open Files. This opens an empty screen and you can fill in your text here. When you are finished, go to Files => Save Buffer As. At the very bottom of the Emacs screen, you will see:

 Write file: ~/

Type the name of the file here, after the /, and press [Enter]. You can designate a specific directory before the file name, if you like. Otherwise, it will be saved in the directory in which you are currently working.

To create a new directory, you can follow the same steps above for creating a file using the graphical file manager, but select File => New => Directory from the main menu. Or you can use the mkdir command at a shell prompt, as explained below.

Open a shell prompt screen by clicking on the appropriate icon on the panel at the bottom of your desktop. Move to your login directory and type:

mkdir tigger

Now, you have created a directory called tigger in your login directory. Your new directory's absolute pathname is /home/yourlogin/tigger, and your home directory is the parent of tigger.

Saving, Naming, and Finding Files

Any file you create that you want to keep must be saved. Simply click on File => Save (or some such similar menu option--they are usually obvious )and your work is saved. To name the file, select Save as instead of Save. A dialog box will open where you select the directory in which that file is to be saved and where you type a name for that file. It is best to use extensions on the end of your file names since extensions explain what type of file it is. For example, a text file should be saved as <filename>.txt, an HTML file should be <filename>.html and so on. For descriptions of file extensions see Appendix C.

Save often. Very important. As you work, click on File => Save, or some such equivalent, often. Computers are known to experience power surges or they just lock up for no obvious reason sometimes. Power surges often cause your machine to spontaneously reboot or shudown. When this happens, any unsaved data is lost.

File System Structure

Every operating system has a method of storing its files and directories so that it can keep track of additions, modifications, and other changes. In Linux, every file is stored on the system with a unique name within directories which can also hold other files and subdirectories.

You might think of the system as a tree-like structure, in which directories "branch off." Those directories may contain, or be the "parent" of, other directories which may, in turn, hold files or directories of their own.

There would not be a tree without a root, and the same is true for the Linux filesystem. No matter how far away the branches, everything is connected to the root, which is represented as a single forward slash (/).

Red Hat Linux uses the term "root" in several different ways, which might be confusing to new users. There is the root account (the superuser, who has permission to do anything), the root account's login directory (/root) and the root directory for the entire filesystem (/). When you are speaking to someone and using the term "root," be sure you know which root you are talking about.

NoteWhat is the FHS?
 

Other Linux distributions exist, and your Red Hat Linux system is probably compatible with them because of the Filesystem Hierarchy Standard (FHS). The FHS guidelines help to standardize the way system programs and files are stored on all Linux systems.

To read more about the FHS, turn to the chapter on system administration in the Red Hat Linux Reference Guide. You can also visit the FHS website: http://www.pathname.com/fhs.

Try logging into your user account (which will help prevent disastrous mistakes), and taking a look around.

First, take a look at the root directory. This will help give a larger picture of where things are.

At the shell prompt, type:

cd /

You will see a prompt that looks like:

[newuser@localhost /]$

Now, take a look at which directories "branch off" the root directory by typing:

ls

This is a little like viewing the tip of an iceberg. The directories you see are the parent directories of other directories, in which there may be other directories, and so on.

Figure A-3. A View of the Directories from Root

Here are just a few of the directories you are likely to find:

etc     lib     sbin
usr     var

There are more, but for now, take a look at the /etc directory.

[newuser@localhost /]$ cd etc
[newuser@localhost /etc]$ ls

Here, among other things, you will find configuration files, which are files that help make programs work for your system, store program and system settings, and more.

Among the directories in here, you will see /etc/X11, which also contains directories and configuration files for the X Window System.

In the directory /etc/skel, you will find skeleton user files, which are used to populate newly created user accounts with standard, commonly used files.

What is a skeleton file? Well, when you were logged in as root, one of the first things you did was create a user account. When that user account was created, files were taken from /etc/skel and placed into the new account. The /etc/skel files are the standard files needed by every new account.

Look around a little in the /usr directory. From your current location in /etc/skel, type:

[newuser@localhost /skel]$ cd /usr
[newuser@localhost /usr]$ ls

If you forgot, cd /usr moves you to the /usr directory and ls lists the files in that directory.

In /usr, you will see a number of directories that hold some of your system's most important programs and files (see Figure 11-8).

Figure A-4. Typing ls in /usr

In /usr/share/man, you will find the system manual pages; other documentation that is not covered by man pages will be found in /usr/share/doc and in /usr/share/info.

In /usr/X11R6, you will find files related to the X Window System, including configuration and documentation files.

In /usr/lib you will find files which are considered libraries for your system. Libraries contain commonly used code that can be shared by many programs.

Red Hat Linux uses the RPM technology of software installation and upgrades. Using RPM, either from the shell prompt or through Gnome-RPM, is a safe and convenient way to upgrade or install software. For more information about using Gnome-RPM, see the Official Red Hat Linux Customization Guide.

Once you become more comfortable with your system, you may want to install software not available in RPM format. To minimize collisions with RPM-managed files, the best place to put such software is in /usr/local.