The Official Red Hat Linux Getting Started Guide
The Official Red Hat Linux Getting Started Guide
rhl-gsg(EN)-7.3-Print-RHI (2002-04-05T16:26-0400)
Copyright © 2002 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set
forth in the Open Publication License, V1.0 or later (the latest version is presently available at
http://www.opencontent.org/openpub/).
Distribution of substantively modified versions of this document is prohibited without the explicit permission of
the copyright holder.
Distribution of the work or derivative of the work in any standard (paper) book form for commercial purposes is
prohibited unless prior permission is obtained from the copyright holder.
The admonition graphics (note, tip, and so on) were created by Marianne Pecci <[email protected]>. They may
be redistributed with written permission from Marianne Pecci and Red Hat, Inc..
Red Hat, Red Hat Network, the Red Hat "Shadow Man" logo, RPM, Maximum RPM, the RPM logo, Linux Library,
PowerTools, Linux Undercover, RHmember, RHmember More, Rough Cuts, Rawhide and all Red Hat-based
trademarks and logos are trademarks or registered trademarks of Red Hat, Inc. in the United States and other
countries.
Linux is a registered trademark of Linus Torvalds.
Motif and UNIX are registered trademarks of The Open Group.
Intel and Pentium are a registered trademarks of Intel Corporation. Itanium and Celeron are trademarks of Intel
Corporation.
AMD, AMD Athlon, AMD Duron, and AMD K6 are trademarks of Advanced Micro Devices, Inc.
Netscape is a registered trademark of Netscape Communications Corporation in the United States and other
countries.
Windows is a registered trademark of Microsoft Corporation.
SSH and Secure Shell are trademarks of SSH Communications Security, Inc.
FireWire is a trademark of Apple Computer Corporation.
All other trademarks and copyrights referred to are the property of their respective owners.
The Red Hat Linux Product Documentation Team consists of the following people:
Sandra A. Moore, Product Documentation Manager — Primary Writer/Maintainer of the Official Red Hat Linux
x86 Installation Guide; Contributing Writer to the Official Red Hat Linux Getting Started Guide
Tammy Fox, Product Documentation Technical Lead — Primary Writer/Maintainer of the Official Red Hat Linux
Customization Guide; Contributing Writer to the Official Red Hat Linux Getting Started Guide; Writer/Maintainer of
custom DocBook stylesheets and scripts
Edward C. Bailey, Technical Writer — Contributing Writer to the Official Red Hat Linux x86 Installation Guide
Johnray Fuller, Technical Writer — Primary Writer/Maintainer of the Official Red Hat Linux Reference Guide
John Ha, Technical Writer — Contributing Writer to the Official Red Hat Linux Getting Started Guide
Table of Contents
Introduction ......................................................................................................................................ix
1. Changes to This Manual ..................................................................................................ix
2. Document Conventions .................................................................................................... x
3. Copying and Pasting Text With X.................................................................................xiii
4. Using the Mouse .............................................................................................................xiii
5. We Need Feedback!.........................................................................................................xiii
6. Sign Up for Support........................................................................................................xiv
1. Getting Started ............................................................................................................................ 15
1.1. Introductory Terms ....................................................................................................... 15
1.2. Logging In ...................................................................................................................... 16
1.2.1. Graphical Login.............................................................................................. 16
1.2.2. Virtual Console Login.................................................................................... 17
1.3. Graphical Interface........................................................................................................ 18
1.4. Opening a Terminal Window (Shell Prompt) ........................................................... 19
1.5. Creating a User Account .............................................................................................. 19
1.6. Documentation Resources ........................................................................................... 21
1.7. Logging Out................................................................................................................... 23
1.7.1. Graphical Logout ........................................................................................... 23
1.7.2. Virtual Console Logout ................................................................................. 25
1.8. Shutting Down your Computer.................................................................................. 25
1.8.1. Graphical Shutdown...................................................................................... 25
1.8.2. Virtual Console Shutdown ........................................................................... 25
2. The GNOME Desktop Environment ...................................................................................... 27
2.1. Introducing GNOME.................................................................................................... 27
2.2. Finding Help.................................................................................................................. 27
2.3. Using the Desktop......................................................................................................... 27
2.4. Using the Panel.............................................................................................................. 28
2.4.1. Using the Main Menu................................................................................... 28
2.4.2. Using Applets ................................................................................................. 29
2.4.3. Adding Icons and Applets to the Panel...................................................... 30
2.4.4. Configuring the GNOME Panel................................................................... 30
2.5. Using Nautilus............................................................................................................... 30
2.6. Using the Start Here Icon............................................................................................. 31
2.6.1. Customizing GNOME ................................................................................... 32
2.6.2. Customizing your System ............................................................................ 32
2.7. Logging Out of GNOME.............................................................................................. 33
3. The KDE Desktop Environment .............................................................................................. 35
3.1. Introducing KDE ........................................................................................................... 35
3.2. Setting Up KDE ............................................................................................................. 35
3.3. Finding Help.................................................................................................................. 35
3.4. Using The Desktop ....................................................................................................... 36
3.5. Using The Panel ............................................................................................................ 37
3.5.1. Using The K Menu ........................................................................................ 38
3.5.2. Using Applets ................................................................................................. 38
3.5.3. Adding Icons and Applets to the Panel...................................................... 40
3.5.4. Configuring the KDE Panel .......................................................................... 40
3.6. Managing Files .............................................................................................................. 40
3.6.1. The Navigation Panel .................................................................................... 41
3.7. Customizing KDE ......................................................................................................... 42
3.8. Logging Out of KDE..................................................................................................... 42
4. Diskettes and CD-ROMs........................................................................................................... 45
4.1. Using Diskettes.............................................................................................................. 45
4.1.1. Mounting and Unmounting a Diskette ...................................................... 45
4.1.2. Reading MS-DOS formatted Diskettes ....................................................... 46
4.1.3. Putting Linux Files on an MS-DOS Diskette.............................................. 46
4.1.4. Formatting a Diskette .................................................................................... 47
4.2. CD-ROMs ....................................................................................................................... 49
4.2.1. Using CD-ROMs with GNOME................................................................... 49
4.2.2. Using CD-ROMs From a Shell Prompt ....................................................... 49
4.3. CD-Rs and CD-RWs...................................................................................................... 50
4.3.1. Using X-CD-Roast ......................................................................................... 50
4.3.2. Using CD-Rs and CD-RWs with Command Line Tools ........................... 53
4.4. Additional Resources ................................................................................................... 55
4.4.1. Installed Documentation............................................................................... 55
4.4.2. Useful Websites .............................................................................................. 55
5. Getting Online............................................................................................................................. 57
6. Web Browsing.............................................................................................................................. 59
6.1. The Mozilla Web Browser ........................................................................................... 59
6.1.1. Mozilla Navigator .......................................................................................... 61
6.1.2. Mozilla Composer.......................................................................................... 62
6.2. Nautilus as a Web Browser ......................................................................................... 62
6.3. Web Surfing with Konqueror...................................................................................... 63
6.4. Using Galeon to Browse the Web............................................................................... 65
7. Email Applications ..................................................................................................................... 69
7.1. Evolution ........................................................................................................................ 69
7.2. KMail .............................................................................................................................. 71
7.3. Mozilla Mail ................................................................................................................... 73
7.3.1. Mozilla and Newsgroups.............................................................................. 74
7.4. Plain Text Email Clients ............................................................................................... 75
7.4.1. Using Pine ...................................................................................................... 76
7.4.2. Using mutt ...................................................................................................... 77
8. Printer Configuration ................................................................................................................. 79
8.1. Adding a Local Printer ................................................................................................. 81
8.1.1. Printing a Test Page ....................................................................................... 83
8.2. Modifying Existing Printers ........................................................................................ 83
8.2.1. Names and Aliases........................................................................................ 84
8.2.2. Queue Type .................................................................................................... 84
8.2.3. Driver............................................................................................................... 85
8.2.4. Driver Options............................................................................................... 85
8.3. Additional Resources ................................................................................................... 85
8.3.1. Installed Documentation............................................................................... 86
8.3.2. Useful Websites .............................................................................................. 86
9. Audio, Video, and General Amusement ................................................................................ 87
9.1. Playing CDs ................................................................................................................... 87
9.2. Playing MP3s ................................................................................................................. 87
9.3. Troubleshooting Your Sound Card............................................................................. 88
9.3.1. If sndconfig Does Not Work......................................................................... 88
9.4. Troubleshooting You Video Card................................................................................ 89
9.5. Games ............................................................................................................................. 89
9.6. Amusements .................................................................................................................. 89
9.7. Finding Games Online ................................................................................................. 90
10. Working with Images ............................................................................................................... 93
10.1. Viewing Images ........................................................................................................... 93
10.1.1. Using Nautilus to view Images ................................................................. 93
10.1.2. Using Konqueror View Images ................................................................. 94
10.1.3. Using GQview .............................................................................................. 95
10.1.4. Electric Eyes .................................................................................................. 97
10.2. Manipulating Images with the GIMP ..................................................................... 98
10.2.1. GIMP Basics .................................................................................................. 98
10.2.2. Loading a File ............................................................................................... 98
10.2.3. Saving a File .................................................................................................. 99
10.2.4. GIMP Options .............................................................................................. 99
10.3. Additional Resources ............................................................................................... 101
10.3.1. Useful Websites .......................................................................................... 101
10.3.2. Related Documentation............................................................................. 101
11. Shell Prompt Basics ................................................................................................................ 103
11.1. Why Use a Shell Prompt .......................................................................................... 103
11.2. The History of the Shell............................................................................................ 103
11.3. Determining Your Current Directory with pwd .................................................... 104
11.4. Changing Directories with cd ................................................................................. 104
11.5. View Directory Contents with ls............................................................................. 107
11.6. Locating Files and Directories................................................................................. 108
11.7. Printing From The Command Line ........................................................................ 109
11.8. Clearing and Resetting the Terminal...................................................................... 110
11.9. Manipulating Files with cat ................................................................................... 110
11.9.1. Using Redirection....................................................................................... 110
11.9.2. Appending Standard Output ................................................................... 112
11.9.3. Redirecting Standard Input ...................................................................... 113
11.10. Pipes and Pagers ..................................................................................................... 113
11.10.1. The more Command................................................................................ 114
11.11. More Commands for Reading Text Files ............................................................. 114
11.11.1. The head Command ................................................................................ 114
11.11.2. The tail Command ................................................................................... 115
11.11.3. The grep Command ................................................................................. 115
11.11.4. I/O Redirection and Pipes...................................................................... 115
11.11.5. Wildcards and Regular Expressions...................................................... 115
11.12. Command History and Tab Completion ............................................................. 116
11.13. Using Multiple Commands ................................................................................... 117
11.14. Ownership and Permissions ................................................................................. 118
11.14.1. The chmod Command............................................................................. 120
11.14.2. Changing Permissions With Numbers ................................................. 123
12. Managing Files and Directories ........................................................................................... 125
12.1. A Larger Picture of the File System ........................................................................ 125
12.2. Identifying and Working with File Types.............................................................. 126
12.2.1. Compressed and Archived Files .............................................................. 126
12.2.2. File Formats................................................................................................. 126
12.2.3. System Files................................................................................................. 126
12.2.4. Programming and Scripting Files............................................................ 127
12.3. File Compression and Archiving ............................................................................ 127
12.3.1. File Compressing........................................................................................ 128
12.3.2. File Archiving ............................................................................................. 130
12.4. Manipulating Files at a Shell Prompt..................................................................... 131
12.4.1. Copying Files .............................................................................................. 131
12.4.2. Moving Files ............................................................................................... 132
12.4.3. Deleting Files and Directories .................................................................. 132
12.5. Viewing PDFs ............................................................................................................ 134
13. Updating and Adding Packages to Red Hat Linux .......................................................... 135
13.1. Red Hat Network ...................................................................................................... 135
13.2. Errata List ................................................................................................................... 135
13.3. Installation CD-ROMs .............................................................................................. 136
14. Frequently Asked Questions ................................................................................................ 137
14.1. Localhost Login and Password ............................................................................... 137
14.2. Displaying ls in color................................................................................................ 137
14.3. Error Messages During Installation of RPMs ....................................................... 138
14.4. Starting Applications................................................................................................ 138
14.4.1. Editing Your PATH .................................................................................... 139
14.5. Accessing a Windows Partition .............................................................................. 139
14.6. Finding Commands Quickly ................................................................................... 140
14.7. Keep ls Output from Scrolling ................................................................................ 141
14.7.1. Printing ls Output ...................................................................................... 141
14.8. Tips on Using Command History........................................................................... 141
14.8.1. Other Shortcuts........................................................................................... 141
14.9. Forgotten Password .................................................................................................. 142
14.10. Password Maintenance .......................................................................................... 142
14.11. Changing Login from Console to X at Startup ................................................... 143
14.12. Configuring X .......................................................................................................... 143
A. Applications.............................................................................................................................. 147
B. A Comparison of Common DOS and Linux Commands ................................................. 149
C. System Directories ................................................................................................................... 151
D. Keyboard Shortcuts................................................................................................................. 153
Index ................................................................................................................................................ 155
Introduction
Welcome to the Official Red Hat Linux Getting Started Guide!
By now, you should have read the Official Red Hat Linux Installation Guide and successfully
installed Red Hat Linux. This manual is designed to help new and intermediate Linux users
navigate and perform common tasks. Keep in mind that Linux looks, feels, and performs
differently from other operating systems you may have used. Forget about the conventions
of other operating systems and, with an open mind, approach Red Hat Linux as a new,
interesting, and versatile alternative.
This manual is task-oriented. You will find useful tips, hints, warnings, and screen shots
interspersed throughout. First, you will learn the basics of using Red Hat Linux, such as
customizing a desktop, configuring a printer, and getting online. Once the basics are covered,
the tasks covered in this manual become progressively more advanced.
Most users choose to work within either the GNOME or KDE graphical desktop environ-
ments (other desktop environments are also available). The Official Red Hat Linux Getting
Started Guide focuses primarily on how to perform tasks in these two environments.
Topics discussed include:
Note
Although this manual reflects the most current information possible, you should read the Red Hat
Linux Release Notes for information that may not have been available prior to our documentation
being finalized. They can be found on the Red Hat Linux CD #1 and online at:
http://www.redhat.com/docs/manuals/linux
Email Applications
This new chapter describes how to use popular email clients including Evolution,
KMail, and Mozilla Mail.
Web Browsing
The Mozilla Web Browser chapter has been merged into this new chapter, which also
includes information on Galeon, Nautilus, and Konqueror.
2. Document Conventions
When you read this manual, you will see that certain words are represented in different
fonts, typefaces, sizes, and weights. This highlighting is systematic; different words are rep-
resented in the same style to indicate their inclusion in a specific category. The types of words
that are represented this way include the following:
command
Linux commands (and other operating system commands, when used) are represented
this way. This style should indicate to you that you can type the word or phrase on the
command line and press [Enter] to invoke a command. Sometimes a command contains
words that would be displayed in a different style on their own (such as filenames). In
these cases, they are considered to be part of the command, so the entire phrase will be
displayed as a command. For example:
Use the cat testfile command to view the contents of a file, named testfile, in the
current working directory.
filename
Filenames, directory names, paths, and RPM package names are represented this way.
This style should indicate that a particular file or directory exists by that name on your
Red Hat Linux system. Examples:
The .bashrc file in your home directory contains bash shell definitions and aliases for
your own use.
The /etc/fstab file contains information about different system devices and filesys-
tems.
Introduction xi
Install the webalizer RPM if you want to use a Web server log file analysis program.
application
This style should indicate to you that the program named is an end-user application (as
opposed to system software). For example:
Use Netscape Navigator to browse the Web.
[key]
A key on the keyboard is shown in this style. For example:
To use [Tab] completion, type in a character and then press the [Tab] key. Your terminal
will display the list of files in the directory that start with that letter.
[key]-[combination]
A combination of keystrokes is represented in this way. For example:
The [Ctrl]-[Alt]-[Backspace] key combination will exit your graphical session and return
you to the graphical login screen or the console.
computer output
When you see text in this style, it indicates text displayed by the computer on the
command line. You will see responses to commands you typed in, error messages, and
interactive prompts for your input during scripts or programs shown this way. For ex-
ample:
Use the ls command to display the contents of a directory:
$ ls
Desktop axhome logs paulwesterberg.gif
Mail backupfiles mail reports
The output returned in response to the command (in this case, the contents of the direc-
tory) is shown in this style.
prompt
A prompt, which is a computer’s way of signifying that it is ready for you to input
something, will be shown in this style. Examples:
$
#
[stephen@maturin stephen]$
leopard login:
user input
Text that the user has to type, either on the command line, or into a text box on a GUI
screen, is displayed in this style. In the following example, text is displayed in this
style:
To boot your system into the text based installation program, you will need to type in
the text command at the boot: prompt.
Additionally, we use several different strategies to draw your attention to certain pieces of
information. In order of how critical the information is to your system, these items will be
marked as note, tip, important, caution, or a warning. For example:
Note
Remember that Linux is case sensitive. In other words, a rose is not a ROSE is not a rOsE.
Tip
The directory /usr/share/doc contains additional documentation for packages installed on your
system.
Introduction xiii
Important
If you modify the DHCP configuration file, the changes will not take effect until you restart the DHCP
daemon.
Caution
Do not perform routine tasks as root — use a regular user account unless you need to use the root
account for system administration tasks.
Warning
If you choose not to partition manually, a server installation will remove all existing partitions on all
installed hard drives. Do not choose this installation class unless you are sure you have no data you
need to save.
5. We Need Feedback!
If you spot a typographical error in the Official Red Hat Linux Getting Started Guide, or if you
have thought of a way to make this manual better, we would love to hear from you! Please
submit a report in Bugzilla (http://www.redhat.com/bugzilla) against the component rhl-
gsg.
xiv Introduction
If you have a suggestion for improving the documentation, try to be as specific as possible
when describing it. If you have found an error, please include the section number and some
of the surrounding text so we can find it easily.
• Official Red Hat support — Get help with your installation questions from Red Hat, Inc.’s
support team.
• Red Hat Network — Easily update your packages and receive security notices that are
customized for your system. Go to http://rhn.redhat.com for more details.
• Under the Brim: The Official Red Hat E-Newsletter — Every month, get the latest news and
product information directly from Red Hat.
Note
Like UNIX, Linux is case sensitive. That means that typing root refers to a different account than
Root. As far as Linux is concerned, the lowercase root refers to the root user (also known as the
superuser), or system administrator.
When you installed Red Hat Linux, you had the opportunity to install the X Window System
(also simply called X), which provides the display of graphical information. You were also
asked whether you wanted to use a graphical screen, rather than a console (or shell prompt)
to log in. A graphical screen has icons, lots of menus, and is generally more approachable for
a new user. A console, or shell prompt, resembles an MS-DOS screen and requires the use
of specific phrases or commands, which the user types at the command line. Although the
emphasis throughout this book will be on navigation and productivity using X, it will cover
both the graphical and console methods of logging in and starting the X Window System.
• Shell prompt: A command line interface (similar to a DOS screen) between the user and
the operating system (Figure 1-1). The shell interprets commands entered by the user and
passes them on to the operating system.
• Command line: The place in the shell prompt where commands are typed.
• Command: An instruction given to the computer, most often with the keyboard or mouse.
• Graphical User Interface (GUI): A screen with icons, menus, and panels for the user to click
on to initiate functions.
16 Chapter 1. Getting Started
• GNOME and KDE: Two popular GUIs included with Red Hat Linux.
• Panel: A GUI environment toolbar, usually located across the bottom of the screen (Figure
1-2). The panel contains the main menu button and shortcut icons to start commonly used
programs. It can be customized by the user.
• Root: The root user account is created during installation and has complete access to your
system. You must be logged in as root to accomplish certain system administration tasks.
User accounts are created so typical user tasks can be done without using the root account,
to reduce the chance of damaging your OS.
• su and su -: The command su gives you access to the root account or other accounts on your
system. When you su to root, or switch to your root account while still inside your user
account shell, you have access to important system files that you can change, or damage,
permanently. Logging in with the su - command makes you root within the root account
shell. Use caution when you are logged in as root.
• Man page and info page: Man (short for manual) and info pages give detailed information
about a command or file (man pages tend to be brief and provide less explanation than
info pages). To read the man page for the su command, for example, type man su at a shell
prompt (or type info su for the info page). To close one of these pages, press [q].
• X or X Window System: These terms refer to the graphical user interface environments. If
you are "in X" or "running X" you are working in a GUI rather than a console environment.
• Console: Console, shell prompt, terminal, "the screen that looks like DOS" — these are all
the same thing: a non-graphical interface (Figure 1-1). This environment has no icons, lim-
ited menus, and requires that you type commands to perform tasks, rather than pointing
and clicking with your mouse.
• RPM: RPM stands for Red Hat Package manager and is how Red Hat builds and delivers
its software files. An RPM is a software package file you can install on your computer.
1.2. Logging In
Unlike some other operating systems, your Red Hat Linux system uses accounts to manage
privileges, maintain security, and more. Not all accounts are created equal: some accounts
have fewer rights to access files or services than others.
If you have already created and logged into a user account, you can skip ahead to Chapter
2. If you created only the root account, read on to learn how to set up a user account.
If you did not create a user account during installation, you must log in as root. After you
create a user account, it is highly recommended that you log in as that user instead of root.
Caution
Because your Red Hat Linux system creates the root account during installation, some new users
are tempted to use only this account for all their activities. This is a bad idea. Since the root account
is allowed to do anything on the system, you can easily damage your system by accidentally deleting
or modifying sensitive system files. You may be tempted to forego creating and using a user account
during or after installation, but this is risky.
Chapter 1. Getting Started 17
During installation, if you selected graphical as the login type and KDE as the default desk-
top, you will see the KDE graphical login screen as shown in Figure 1-4 instead.
To log in as root from either graphical login screen, type root at the login prompt, press
[Enter], type the root password that you chose during installation at the password prompt,
and press [Enter]. To log in as a regular user, type your username at the login prompt, type
your password that you selected when creating the user at the password prompt, and press
[Enter].
Logging in from the graphical login screen automatically starts the X Window System (the
graphical interface) for you.
localhost login:
18 Chapter 1. Getting Started
Unless you have chosen to give your machine its own hostname, which is primarily used in
a network setting, your machine will proabably be called localhost.localdomain.
To log in as root from the console, type root at the login prompt, press [Enter], type the
root password that you chose during installation at the password prompt, and press [Enter].
To log in as a regular user, type your username at the login prompt, press [Enter], type
your password that you selected when creating the user at the password prompt, and press
[Enter].
After logging in, you can type the command startx to start the X Window System graphical
interface.
If you want to log in to your Red Hat Linux system with a different desktop, select it from
the pulldown menu on the graphical login screen, and then log in to the system. The desktop
that you selected will appear.
For more information about GNOME and KDE, refer to Chapter 2 and Chapter 3.
On the GNOME panel, the button that launches a shell prompt looks like .
You can also open a shell prompt in GNOME by selecting GNOME Main Menu => Pro-
grams => System => GNOME Terminal.
Similar to GNOME, the KDE panel prominently features a quick launch button for a shell
There are two ways to create new and/or additional user accounts: using the Red Hat User
Manager or from a shell prompt.
To create a user account graphically:
1. In GNOME, click the Start Here icon on the panel at the bottom of your desktop. In
the new window that opens, click the System Settings icon, and then click the User
Manager icon. You can also select GNOME Main Menu => Programs => System =>
User Manager.
In KDE, select KDE Main Menu => System => User Manager.
2. If you are not logged in as root, you will be prompted for your root password.
3. The window shown in Figure 1-7 will appear. Click on New User.
4. In the New User dialog box, enter a username (this can be an abbreviation or nick-
name), the full name of the user for whom this account is being created, and a password
(which you will enter a second time for verification). The name of this user’s home di-
rectory and the name of the login shell should appear by default. For most users, you
can accept the defaults for the other configuration options. Refer to the Official Red Hat
Linux Customization Guide for details about the additional options.
5. Click OK. The new user will appear in the user list, and the user account creation is
complete.
To create a user account from a shell prompt:
5. At the New password: prompt enter a password for the new user and press [Enter].
6. At the Retype new password: prompt, enter the same password to confirm your se-
lection.
Important
You can be fancy or plain when you pick a user account name, but take precautions when you
choose a password. The password is the key to your account, so it should be both unique and
easy for you to remember. Your password should be at least six characters. You can use both
uppercase and lowercase letters, as well as numbers and characters. Avoid easy selections,
such as qwerty or password. If you want to pick an easy-to-remember but somewhat unique
password, consider a variation of a word, such as a!rPl8nE for airplane.
shell prompt by typing the su - command, entering the root password when prompted,
and typing the command gnorpm. The screen as shown in Figure 1-8 appears.
Click on the Install button in the upper left corner of this window. Another screen ap-
pears, similar to Figure 1-9.
Scroll through the list of documents on the left. Files beginning with rhl are Red Hat
Linux manuals. The letters ig, gsg, cg, and rg follow rhl, corresponding to the Instal-
lation, Getting Started, Customization, and Reference guides respectively.
Select the manual(s) you want to install by clicking on the checkbox to the right of the
filename. Then, click on the Install button. An installation status screen appears and
closes when installation is complete.
The manual(s) you installed now appear on the main menu under Programs => Docu-
mentation => Official Red Hat Linux.
The manuals can also be installed from a shell prompt. Open a shell prompt, and type
the following at the command line:
su -
Chapter 1. Getting Started 23
Press [Enter]. You will be asked for your root password. Enter the password at the
prompt and press [Enter]. You are now logged in as root. To install all four manuals,
type the following:
rpm -ivh /mnt/cdrom/rhl-*.rpm
Press [Enter].
To install only certain manuals, replace rhl-*.rpm with the full file name of the manual
that you want to install. For example, the file name for the Official Red Hat Linux Getting
Started Guide will look something like rhl-gsg-en-7.2-5.noarch.rpm, so you would
type the following to install the Official Red Hat Linux Getting Started Guide on your
computer:
rpm -ivh /mnt/cdrom/rhl-gsg-en-7.2-5.noarch.rpm
Press [Enter]. Type exit at the command line and press [Enter]. This takes you out of
the root login and back to your user account.
Now go to Main Menu => Programs => Documentation => Official Red Hat Linux
and select the manual you want to open.
When the confirmation dialog appears as shown in Figure 1-11, select the Logout option and
click the Yes button. If you want to save the configuration of your desktop, as well as any
programs which are running, check the Save current setup option, as well.
24 Chapter 1. Getting Started
Similarly, in KDE, you can log out by selecting KDE Main Menu => Logout.
If you chose KDE as your default desktop environment during your installation of Red Hat
Linux, your logout screen will look like Figure 3-10:
If you chose GNOME as your default desktop environment during your installation of Red
Hat Linux, your logout screen will look like Figure 3-9:
At the logout screen, KDE offers you the chance to save your current settings, which will
preserve your panel configuration and start any applications that you left open in your ses-
sion.
If you are working in an application and you have not saved your work when you log out,
a dialog will inform you that you will lose your unsaved material when you log out. When
Chapter 1. Getting Started 25
you see this dialog, you can simply select the Cancel button, save your work, then log out
again. If you continue without saving your work, you will lose the unsaved data.
By default, the KDE panel also contains a quick launch button to log out; it is located on the
right-side of the panel, and looks like .
Some computers automatically turn the power off after shutting down Red Hat Linux. If
your computer does not, you can turn off the power to your computer after you see the
message:
System halted.
26 Chapter 1. Getting Started
Chapter 2.
The GNOME Desktop Environment
Tip
If you have both GNOME and KDE installed on your system, you can use applications from the
other environment. For example, you can use the KDE email client, KMail, while you are working
in GNOME. You will find access to the KDE applications in the Main Menu (the stylized foot at the
bottom of the screen) under KDE Menus.
Clicking on the icon on GNOME Panel displays the GNOME User’s Guide.
GNOME Pager
The GNOME Pager is a simple applet that allows you to see what applications you
have open on your desktop(s). GNOME gives you the ability to use multiple desktops
so you do not have to have all your running applications crowding one workspace. The
GNOME Pager will represent each desktop in small squares and show the applications
running in each. You may click on one of the squares with your mouse to move to that
desktop. You can also use the keyboard shortcut [Shift]-[Meta]-[right-arrow] or [Shift]-
[Meta]-[left-arrow] to switch between desktops. (The [Meta] key is usually the [Alt] key.)
Taskbar
To the left of the GNOME Pager is the GNOME Taskbar. The taskbar is an applet which
shows you the titles of running applications on any desktop. This is very helpful if you
decide to minimize an application as it will seem to disappear from the desktop. Once
it disappears, you can bring it back by clicking on its title in the GNOME Taskbar.
If you click on the applet, the Red Hat Update Agent will run so you can connect to
Red Hat Network. If you are not registered with Red Hat Network, it will launch the
registration application. Right-click on the applet icon and select Help for details.
Tip
Another quick and easy way to add a launcher to the panel is to click on the GNOME Main Menu
button and select Panel => Add to Panel => Launcher from menu. Then select an application that
appears on the Main Menu. This will automatically add a launcher based on the properties of the
item in the Main Menu.
Once you have Nautilus, you can navigate through your home directory or the rest of the
file system. To return to your home directory, click the Home button.
When you are navigating through your file system, you will always be able to see where you
are by looking at the frame on the left hand side of Nautilus which shows you the current
directory.
The main frame contains folders and files which you can drag with your mouse to move and
copy them into new locations. If you prefer, you may click on the Tree tab on the bottom left
to display a hierarchical view of your complete file system which may make moving and
copying easier for you.
If you do not want to use the tree view, you can always open another Nautilus window by
selecting File => New Window. Once you have another Nautilus window, dragging files to
different directories is easy to accomplish. By default, dragging a file from one directory to
another will move the file. If you wish to copy the file to another directory, press the [Ctrl]
key while dragging and dropping the file.
By default, text-based files and images in your home directory will be seen as thumbnails.
For text files, this means you will see the beginning of the actual text in the icon. For images
you will see a scaled-down version of the image. To turn off this feature, select Preference
=> Edit Preferences. Select Speed Tradeoffs from the menu on the left. Select Never for
the visual enhancements that you want to disable. Disabling these features will increase the
speed of Nautilus.
The Start Here screen was designed to hold all of the tools and applications you need to
access when using your system. From your favorite applications to system configuration
tools, the Start Here window provides a central location.
You may access the Start Here page at any time by clicking on the desktop icon labeled Start
Here or by selecting Start Here from the Main Menu.
The Start Here screen includes icons that allow you to access your favorite applications,
desktop preferences, Main Menu items, server configuration tools, and system settings.
32 Chapter 2. The GNOME Desktop Environment
You may want to add your own favorite applications to the Favorites section off of the Start
Here area. To add an application to the Favorites section, select the application from the
Main Menu, click on it with your right mouse button, and select the Add this to Favorites
menu item from the pop-up menu. You will see an icon for the application in the Favorites
section immediately.
Desktop
This contains items which are associated with the appearance of your desktop. For ex-
ample, you may configure your background, panel, and screen saver.
Multimedia
In this section you will be able to configure the system sounds associated with various
functions. For example, if you would like to have a sound play when you log in to
GNOME, you will set that here.
Peripherals
If you have any items plugged into your system that GNOME understands or has as-
sociated applications, this area will contain configuration tools for them. Keyboard and
mice will always be here, but you may also have a tool to help you configure GNOME
for a PDA as well.
Date/Time Properties
This tool allows you to set the date and time of your machine. You will be able to set
your time zone information as well. Refer to the Official Red Hat Linux Customization
Guide for details.
Hardware Browser
The Hardware Browser probes your machine for all available hardware, whether it is
internal or external. Each hardware device will bring up different information depend-
ing on the device. For example, a hard drive will display partitioning information as
Chapter 2. The GNOME Desktop Environment 33
well as the amount of available space. Refer to the Official Red Hat Linux Customization
Guide for details.
Network Configuration
The Network Configuration tool allows you to set up any type of network connection
whether it is a modem, a network card, a wireless card, or broadband connection. Refer
to the Official Red Hat Linux Customization Guide for details.
To quit GNOME, select the Log Out menu item from the Main Menu. This will bring up a
dialog which presents you with the options listed above.
34 Chapter 2. The GNOME Desktop Environment
Chapter 3.
The KDE Desktop Environment
Tip
If you have both KDE and GNOME installed on your system, you can use applications from the other
environment. For example, you can use the GNOME email and personal information management
suite, Evolution, while you are working in KDE. You can access GNOME applications by clicking the
Start Application button (the ’K’ icon at the bottom of the screen), then choosing Programs from
the menu.
The KDE desktop displays application launchers, document windows, file folders, and so
on. You can also access the main menu and configure the desktop to suit your needs.
The long bar across the bottom of the desktop is the panel. The panel contains application
launchers, status indicators, and the desktop manager. You can have up to 16 desktops run-
ning at the same time in KDE. The panel taskbar shows your currently running applications.
Icons located on the desktop can be files, folders, device links, or application launchers. Click
on an icon to open the associated resource.
The KDE desktop works similarly to other graphical desktop environments. You can drag
and drop files and application icons to any location on the desktop. You can also add new
icons for all types of applications and resources to the desktop, panel, or file manager. The
desktop itself is also highly customizable. You can change the appearance of buttons, win-
dow and frame decorations, and backgrounds easily. Configuration tools are also available
which allow you to customize the way the desktop behaves at events such as single- and
double-clicking mouse buttons and combining (also called chording) keystrokes to create
time-saving shortcuts.
The default KDE desktop displays icons for the trash can, your home directory, the KDE
Control Panel, and a link to the Red Hat website. You can access any one of these resources
by clicking on the associated icon.
When you right-click on these icons, you will see several options for working with these
resources, such as Delete Rename Move to Trash, and Copy.
You can drag and drop unwanted items such as files you no longer need to the Trash icon.
Right-click on the trashcan and select Empty Trash Bin to delete the items from your system
permanently.
The panel is highly configurable. You can add and remove buttons that launch applications
easily. Right-click on the panel and select Panel => Configuration to open the panel Settings.
Other tabs in Settings contain options to further customize your panel. Click on Help for
more information on these options.
Applications and utilities can be added easily to the panel. To add an application to the panel,
right-click on the panel and choose Panel => Add. Then select Button, Applet, Extension,
or Special Button, and make your choice from the corresponding menus.
The K Menu is the main menu for KDE. Clicking on the K Menu icon on the panel dis-
plays a large master menu from which you can perform tasks such as launch applications,
find files, and configure your desktop. The main menu also contains several submenus that
organize applications and tools into several categories, including Utilities, Graphics, Inter-
net, and Multimedia.
From the K Menu, you can lock your screen, which will display a password-protected
screensaver. You can also run applications from a command line as well as logout of your
KDE session.
1. Right-click on the desktop; you will see a brief menu of actions you can take.
2. Select Configure Desktop; the KDE panel configuration tool will open.
3. Click the Number of Desktops tab (see Figure 3-5).
Chapter 3. The KDE Desktop Environment 39
You can change the names of your desktops (from Desktop 1, Desktop 2, etc.) by deleting
the default names and typing a new name in each desktop’s corresponding text box.
You can also change the number of desktops available to you by adjusting the slider at the
top of the Desktops tab. For more desktops, drag the bar to the right; for fewer desktops,
drag the bar to the left.
The Desktop, Appearance, and Borders tabs are where you can make various desktop con-
figuration selections, like icon arrangement and font size.
After you make any adjustments to your desktop configuration, click Apply to save the
changes and close the panel configuration tool.
Buttons for your desktops appear on the panel in the Desktop Pager. Simply click on the
tiles to move to a different desktop.
Tip
You can use the keyboard combination of the [Ctrl] and Function keys to switch desktops. For ex-
ample, [Ctrl]-[F2] will switch you from desktop one to desktop two, [Ctrl]-[F3] will take you to desktop
three, and so on.
You can maximize running applications or bring them to the front of your working windows
by clicking on the associated item on the taskbar.
Tip
Another way to bring minimized or background windows to the front is to use the [Alt] and [Tab] keys.
To pick an item from the taskbar, hold down [Alt]-[Tab]. To scroll through the tasks, hold down the [Alt]
key, while pressing the [Tab] key in succession. When you have found the task you want to maximize
and bring to the front, release both keys.
To start Konqueror for file management, click on your home directory icon .
Konqueror will open up in a window on your desktop, allowing you to navigate through
your home directory and throughout your Red Hat Linux file system. After exploring, you
can return to your home directory by clicking the Home button on the toolbar.
Chapter 3. The KDE Desktop Environment 41
You can navigate through the file system by clicking on folders within the main window
frame or through the hierarchical file system viewer on the navigation panel as shown in
Figure 3-7. Files and folders in the main window frame can be moved or copied to another
folder or sent to the trash. You can also delete files and folders by right-clicking on the item
and choosing Delete.
Konqueror can also generate thumbnail icons for text, images, PostScript/PDF files, and
Web files. You can even generate preview sounds from mp3 files. From the toolbar choose
View => Preview and choose the file types for which you would like to see thumbnail icons
generated. Thumbnails will be immediately generated for any associated files in the Kon-
queror window.
The navigation panel lets you access your Web bookmarks, browsing history, network re-
sources, file system, and has a built-in media player for playing multimedia files without
having to open a separate application. The navigation panel makes Konqueror an effieient
solution for users who wish to have fast and easy access to all of their information.
File Browsing
This section lets you configure the Konqueror file manager and customize certain file
operations. You can also associate files to applications that you prefer (for example,
assigning all MP3 files to open in XMMS instead of the default player).
Note
KDE features support for smooth (anti-aliased) fonts. However, not all fonts are smooth by de-
fault. In order to have smooth fonts for your entire desktop (whether you are reading text files,
webpages, or text in menus and icons) you must choose fonts that are designed to be anti-
aliased, such as LucidaTypewriter or Courier).
Personalization
This section allows you to set country and language options to your particular locale.
You can also configure accessibility features such as audible and visual cues and key-
board/mouse customization. You can also configure your shell prompt settings via the
Konsole option. Privacy and encryption settings can be configured via the Crypto op-
tion.
System
This section is an advanced administration interface. You will need your root password
to configure most of these options. This section allows you to configure system boot
settings, Linux kernel configuration, printer settings, and install fonts system-wide. It is
strongly recommended that you leave these settings at their default values unless you
understand the consequences of changing them.
Web Browsing
This section allows you to configure the Konqueror Web browser. You can configure
options such as cache sizes, website cookies, plugins, proxy settings (if available), and
enhanced browsing using keyword shortcuts.
Chapter 3. The KDE Desktop Environment 43
If you chose KDE as your default desktop environment during your installation of Red Hat
Linux, your logout screen will look like Figure 3-10:
At the logout screen, KDE offers you the chance to save your current settings, which will
preserve your panel configuration and start any applications that you left open in your ses-
sion.
If you are working in an application and you have not saved your work when you log out,
a dialog will inform you that you will lose your unsaved material when you log out. When
you see this dialog, you can simply select the Cancel button, save your work, then log out
again. If you continue without saving your work, you will lose the unsaved data.
44 Chapter 3. The KDE Desktop Environment
Chapter 4.
Diskettes and CD-ROMs
Using diskettes and CD-ROMs with Red Hat Linux requires some understanding about re-
movable media. This chapter discusses how to read and write files to and from diskettes,
how to format diskettes, and how to read and copy data from a CD-ROM. This chapter also
covers using CD-writable and CD-rewritable drives.
desktop icon which you can double-click to explore the diskette contents in Nautilus.
Now that the diskette has been mounted it is available to be copied from or written to. You
can open, save, and copy files to/from it as you would normally do to your hard drive. You
can even explore the diskette’s contents in Nautilus or Konqueror, as shown in Figure 4-1.
When you are done using the diskette, you should unmount it before ejecting it from the
drive. To do this, close any applications that may be using files on the diskette or exploring
the diskette’s contents (like Nautilus or Konqueror), and at a shell prompt type the follow-
ing command :
umount /mnt/floppy/
If you are using GNOME, unmount the diskette by right-clicking on the icon and
choosing Unmount Volume from the menu.
You can now safely eject the diskette from the drive.
mcopy a:thisfile.txt
thisfile.txt
thisfile.txt will be copied from the diskette drive (drive A:) to the directory you were
in when you issued the mcopy command. If you are in your home directory, you will find
thisfile.txt located there.
If you want to view the contents of an MS-DOS formatted diskette, type mdir at the prompt.
You will be shown the contents of the diskette. The directory listing will look familiar to some
MS-DOS or Windows users, as it is styled in the MS-DOS dir listing format. For example:
[joe@localhost joe]$ mdir a:
Volume in drive A has no label
Volume Serial Number is 0000-0000
Directory for A:/
To change to a subdirectory on the diskette, type the following command at a shell prompt:
mcd a:subdir
In the above command, subdir is the name of the subdirectory you want to access.
Chapter 4. Diskettes and CD-ROMs 47
cp filename /mnt/floppy
You can then unmount the floppy and eject it from the drive. The new file on the diskette
should now be accessible from your Windows machine.
Warning
Formatting a diskette will erase all of its contents. Be sure to backup any files that you need before
performing any of the following operations on your diskettes.
Once you have created an ext2 file system on the diskette, you can manipulate its contents
in the same ways that you manipulate directories and files on your hard drive.
Insert a diskette and change the settings to suit your needs; then click Format. The status box
will appear on top of the main window, showing you the status of formatting and verifying
(see Figure 4-3). When it is complete, you can eject the disk and close gfloppy.
48 Chapter 4. Diskettes and CD-ROMs
Insert a diskette that you wish to format and choose whether you want a Quick Format or
Full Format by choosing the appropriate radio button. To check for bad sectors or blocks on
the diskette while formatting, choose Verify Integrity in the associated check box.
To begin formatting, click the Format button. A window will pop-up asking if you wish to
format the diskette. Click Continue to dismiss this window and begin formatting. A status
bar will appear at the bottom of the window showing the status of the format. After the
diskette has been formatted, a final window will appear to inform you of a successful format.
Click OK, remove the diskette, and click Quit to close the application.
/sbin/mke2fs /dev/fd0
Chapter 4. Diskettes and CD-ROMs 49
On Linux systems, /dev/fd0 refers to the first diskette drive. If your computer has more than
one floppy disk drive, your primary floppy drive will be /dev/fd0, your second /dev/fd1,
and so on.
The mke2fs utility has a number of options. The -c option makes the mke2fs command
check the device for bad blocks before creating the file system. The other options are covered
in the mke2fs man page.
Once you have created an ext2 file system on the diskette, it is ready to be used with your
Red Hat Linux system.
4.2. CD-ROMs
The CD-ROM format is a popular way to deliver typically large software applications and
multimedia presentations. Most of the software that can be purchased from retail outlets
come in the form of CD-ROMs. This section shows you how to use CD-ROMs on your Red
Hat Linux system.
By default, Red Hat Linux automatically detects if a CD-ROM is inserted in the CD-ROM de-
vice. If you are using the GNOME desktop environment, the disc will then be mounted and
the Nautilus file manager will open a window with the drives contents for you to explore. If
you use KDE, you will need to mount your CD-ROM manually at a shell prompt before you
can explore it through the Konqueror file manager or read files from it. Instructions on how
to mount CD-ROMs manually are in Section 4.2.2.
A CD desktop icon will also appear, which you can use to unmount and eject your
CD-ROM after use. Right-click on the icon to view all of the available choices. For example,
to unmount and eject the CD-ROM, choose Eject from the menu.
50 Chapter 4. Diskettes and CD-ROMs
The CD-ROM should now be mounted and available for use with your file manager. If you
are using KDE, you can access your CD-ROM by clicking the icon on the desktop and
typing /mnt/cdrom in the location bar. Figure 4-6 shows the contents of a CD-ROM dis-
played in the Konqueror file manager.
After working with your CD, you must unmount it before you eject it from your CD-ROM
drive. Close any applications or file managers that are using the CD-ROM and type the
following at a shell prompt:
umount /mnt/cdrom
You can now safely press the eject button on your CD-ROM drive to retrieve your CD.
and find your CD-R(W) drive. It will then allow you to configure settings for CD-writer, CD-
ROM drive, and more. Figure 4-7 illustrates the Setup screen and its configuration options.
Note that your CD-R(W) drive brand may be different from the drive shown.
Check your CD-R(W) manufacturer documentation to set some of the CD Settings options,
such as CD Writer Speed and CD Writer FIFO-Buffer Size. All CD image (.iso or .img)
files need to be stored in a central location accessible to X-CD-Roast. You will have to specify
a path on your hard drive’s file system that has at least 700 Megabytes (MB) of free space
available. You can configure the path where you wish to store CD images in the HD Settings
tab under Path.
X-CD-Roast is well-documented within the interface itself, as several of the options have
long, descriptive pop-up tips that informs you of the associated function in detail. You can
access these tooltips by leaving your mouse pointer on a button or drop-down menu for at
least two seconds.
Highlight the files and directories that you wish to add to the session and click Add. After
you have added all the files and directories you want to write to the CD-R(W), click the
Create session/image tab to create the .img file. You must first click Calculate size, then
Master to image file to create the image.
Chapter 4. Diskettes and CD-ROMs 53
To write your tracks to the CD-R(W), click Write Tracks from the panel on the left. In the
Layout Tracks tab, highlight the image file you created in the box on the right, and click
Add. The image will be displayed in the Tracks to write box on the left side. Click Accept
track layout, and click the Write Tracks tab to return to the main writing dialog. Click Write
tracks to write the image to the CD-R(W).
Tip
You can also create and write the image to the CD-R(W) in one step by clicking Master and write on-
the-fly in the Create session image tab. This saves a few steps but can sometimes cause read-write
errors. It is recommended that you use the multi-step method instead of on-the-fly methods.
The image will be created in the directory which you were in when you ran the command.
Table 4-1 explains each command-line option.
You can now use the ISO image file with either X-CD-Roast as described in Section 4.3.1.3,
or using cdrecord.
54 Chapter 4. Diskettes and CD-ROMs
Option Function
-o Specify an output filename of the ISO image
-J Generate Joliet naming records; useful if the CD will be
used in Windows environments
-R Generate Rock Ridge (RR) naming records to preserve
filename length and casing, especially for UNIX/Linux
environments
-A Set an Application ID — a text string that will be written
into the volume header of the image that can be useful to
determine what applications are on the CD
-V Set a Volume ID — a name that will be assigned to it if the
image is burned and the disc is mounted in Solaris and
Windows environments
-v Set verbose execution, which is useful for viewing the
status of the image as it is being made.
-x Exclude any directory immediately following this option;
this option can be repeated (for example, ... -x
/home/joe/trash -x /home/joe/delete ...)
This command will show all CD-R(W) devices on your computer. Remember the device
address of the device you will use to write your CD. The following is an example output
from running cdrecord -scanbus.
Cdrecord 1.8 (i686-pc-linux-gnu) Copyright (C) 1995-2000 Jorg Schilling
Using libscg version ’schily-0.1’
scsibus0:
0,0,0 0) *
0,1,0 1) *
0,2,0 2) *
0,3,0 3) ’HP ’ ’CD-Writer+ 9200 ’ ’1.0c’ Removable CD-ROM
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
To write the backup file image created with mkisofs in the previous section, switch to root
user and type the following at a shell prompt:
cdrecord -v -eject speed=4 dev=0,3,0 backup.iso
Chapter 4. Diskettes and CD-ROMs 55
The command above sets the write speed at 4, the device address as 0,3,0, and sets write
output to verbose (-v), which is useful for tracking the status of the write process. The -eject
argument ejects the CD-ROM after the write process is complete. The same command can
also be used for burning ISO image files downloaded from the Internet, such as Red Hat
Linux ISO images.
You can use cdrecord to blank CD-RW discs for reuse by typing the following:
cdrecord --dev=0,3,0 --blank=fast
• cdrecord man page — Discusses how to burn data, audio and mixed-mode CD-ROMs.
Offers all options and commands in detail, including some example commands for com-
mon CD-R(W) burning tasks.
• /usr/share/doc/cdrecord- version
(where version is the version of cdrecord
installed on your system) — Several documentation files are included with general usage
and licensing information.
• mkisofs man page — Comprehensive detail of the utility, including some warnings about
creating certain types of ISO images. Offers all options and commands in detail, including
some example commands for creating common ISO image files.
• /usr/share/doc/mkisofs- version
(where version is the version of mkisofs
installed on your system) — Several documentation files are included with general usage
and licensing information.
• /usr/share/doc/xcdroast- version
(where version is the version of X-CD-
Roast installed on your system) — Contains useful command-line options and usage in-
formation for this graphical CD-R(W) mastering application.
• /usr/share/doc/dvdrecord- version / (where version is the version of
dvdrecord installed on your system) — For users who have DVD-R(+W) devices, this set
of documentation helps you get started mastering DVD-ROMs for data backup and
multimedia presentation.
• ISDN Connection
• Modem Connection
• xDSL Connection
• Cable Modem Connection
The Internet Druid application can be used to configure an Internet connection in Red Hat
Linux.
If you would like to configure an Internet connection in Red Hat Linux, you need to use the
Internet Druid application.
To use Internet Druid, you must be running the X Window System and have root privileges.
To start the application, use one of the following methods:
• On the GNOME desktop, go to the Main Menu Button (on the Panel) => Programs =>
System => Internet Configuration Wizard.
• On the KDE desktop, go to the Main Menu Button (on the Panel) => System => Internet
Configuration Wizard.
• Type the command internet-druid at a shell prompt (for example, in an XTerm or a
GNOME terminal).
Your own ISP may have specific connection requirements for their service which differ from
the instructions in this chapter. Before connecting, check with your ISP for any specific in-
structions that they provide, including the following information:
• The phone number that your modem must dial to connect to your ISP if you are using a
modem.
• Your login name and password for the ISP account.
• A gateway address. Some ISPs may require you to configure a gateway address.
• DNS entries: DNS means Domain Name System. DNS servers act as a road map for the In-
ternet. When you use the Internet, the DNS tells your machine where to send its message
traffic. DNS tracks IP (Internet Protocol) addresses; each computer connected to the Inter-
net must have an IP address, which is a unique set of numbers like 2xx.2xx.2x.2. You
may receive one or more DNS entries from your ISP when you sign up.
ISDN Connection
An ISDN (Integrated Services Digital Network) connection uses high-speed,
high-quality digital telecommunication lines as opposed to an analog modem
connection. This special phone line must be installed by a phone company. To
configure this type of connection, start Internet Druid, select ISDN Connection, and
follow the steps in the wizard.
58 Chapter 5. Getting Online
Modem Connection
A modem connection uses a modem to establish a connection to the Internet. Digital
data is modulated into analog signals and sent over phone lines. To configure this type
of connection, start Internet Druid, select Modem Connection, and follow the steps in
the wizard.
xDSL Connection
An xDSL (Digital Subscriber Line or Loop) connection uses high-speed transmissions
through telephone lines. DSL stands for Digital Subscriber Lines. There are different
types of DSL such as ADSL, IDSL, and SDSL. Internet Druid uses the term xDSL to
mean all types of DSL connections.
Some DSL providers require you to configure your system to obtain an IP address
through DHCP with an Ethernet card. To configure this type of connection, start In-
ternet Druid, select Ethernet Connection, and select DHCP on the Configure Network
Settings screen. Some DSL providers require you to configure a PPPoE (Point-to-Point
Protocol over Ethernet) connection with an Ethernet card. To configure this type of con-
nection, start Internet Druid, select xDSL Connection, and follow the steps in the wiz-
ard. If you must supply a username and password to connect, you are probably using
PPPoE. Ask your DSL provider which method you should use.
• Mozilla
• Nautilus
• Konqueror
• Galeon
If you have previously been using Netscape as your Web browser, or performed an upgrade
where Netscape was used as your Web browser, you will not see the main Mozilla browser
as see in Figure 6-1.
Instead, you will see:
60 Chapter 6. Web Browsing
Here you can select to create a new profile or you can create a profile based on your user ac-
count. This feature helps you stay organized by creating separate user accounts for business
use, personal use, multiple accounts, etc.
Clicking Create Profile will take you to a information screen explaining what this process
really means. To continue, click Next.
Next, choose a name to use for this new profile. If you do not enter a name, the profile will
be called Default User.
You can also click Choose Folder to select where your Mozilla settings and preferences will
be stored. By default, these settings are stored in:
/home/youraccountname/.mozilla/Defualt User
Now that you have created a user profile, click on Start Mozilla to launch the application or
click on Exit to close it.
To add new profiles or delete existing profiles later on, you will need to run the Mozilla
Profile Manager again. To launch the Mozilla Profile Manager, at the shell prompt type the
following command:
mozilla --ProfileManager
The Mozilla screen has all of the standard Web browser functions that other browsers have.
There is a main menu at the top of the screen and a navigation bar below it. There is a sidebar
62 Chapter 6. Web Browsing
on the left that contains additional options. And in the bottom left corner, there are four small
icons : Navigator, Mail, Composer, and Address Book.
To browse the Internet, click on Search and enter a topic in the search engine that opens,
type a website URL in the location bar, click on and create bookmarks, or check the What’s
Related sidebar tab to see pages related to the one you are viewing currently.
For additional information on using Mozilla, click on Help (on the top menu panel) and
then on Help Content.
Or, you can use the Location: bar to enter path names, URLs, or other types of addresses.
When you are viewing a Web page, Nautilus gives you additional browser choices in case
you want to use a full-featured Web browser. To select a different browser, click one of the
buttons in the sidebar.
For additional information on using Nautilus, click on Help (on the top menu panel) and
select Nautilus User Manual or Nautilus Quick Reference.
When you first launch Konqueror, you will be presented with an Introduction screen. This
screen offers basic instructions for browsing a webpage or your local file system.
If you click Continue, you will be presented with the Tips screen. This screen does just what
it implies, it shows you basic tips for using Konqueror so that you can begin to take full
advantage of the technology Konqueror offers.
By clicking Continue from the Tips screen, you will see the Specifications screen. This screen
displays information on supported standards (such as Cascading Stylesheets, plug-ins, and
OpenSSL), featured protocols, and more.
To begin your first Web search, enter a URL in the open field beside Location.
For additional information on using Konqueror, click on Help (on the top menu panel) and
then on Konqueror Handbook.
Chapter 6. Web Browsing 65
During the initial configuration, you have the option of importing bookmarks from Netscape
or Mozilla, as well as some preference from Netscape if you have been using it as your prior
Web browser.
Once you have finished your configuration of Galeon, the main browser will appear.
Chapter 6. Web Browsing 67
Tip
Galeon’s "tabbed browsing" feature can help you avoid having your desktop cluttered with browser
windows. Multiple pages can be stored in a single Galeon window, and you can switch between them
with a click of the mouse. The behavior of the tabbed browsing mode can be configured in the Tabs
page of the Preferences Window.
To launch a new Tab even more quickly, use the [Ctrl]-[T] key combination.
For additional information or help with Galeon, click Help on the top menu bar. From there,
you can choose to view the Galeon FAQ and Galeon manual.
68 Chapter 6. Web Browsing
Chapter 7.
Email Applications
Many popular Web browsers and email applications are one in the same, such as Mozilla,
but they do not have to be. Applications like KMail and Evolution let you get and send
email, among other tasks, but they do not include Web browsers.
The purpose of this chapter is simple; to demonstrate how to use certain email applications
to send and receive mail. It will not document each application feature, doing so is outside
the scope of this manual.
This chapter will briefly discuss the following email applications:
• Evolution
• KMail
• Mozilla Mail
• Text-based email clients
When you first launch any email application, you must configure it so you can send and
receive mail. In order to configure it properly, there are a few pieces of information you must
know.
7.1. Evolution
Evolution is more than just an email client. Evolution provides all standard email handling
features, plus powerful mailbox management, user-defined filters, and quick searches. It
supports a flexible calendar and allows users to create and confirm group meetings online.
Evolution is the premier personal and workgroup information management tool for Linux
and UNIX-based systems.
To launch Evolution in GNOME, go to Main Menu => Programs => Applications =>
Ximian Evolution.
To see what is in your inbox or to send a mail, click on the Inbox icon.
Chapter 7. Email Applications 71
Once you have composed a message and entered an email address to send the email to, click
Send in the toolbar.
For additional information, click on Help from Evolution’s toolbar.
72 Chapter 7. Email Applications
7.2. KMail
KMail is an email tool for KDE, the K Desktop Environment. It has an intuitive graphical
interface that makes it simple to use. To open KMail, click on the main menu button on the
panel and select Internet => KMail.
Before you can really use KMail, you must configure it so it can send and receive mail. To
run the configuration tool, select Settings from the KMail toobar, and click on Configure
KMail.
The Configure Mail Client window consists of seven sections: Identity, Network, Appear-
ance, Composer, Mime Headers, Security, and Miscellaneous. To begin sending and re-
ceiving messages you will only have to change the settings in the Identity and Network
tabs.
For additional information, refer to the KMail user manual (Help => Contents) or visit
KMail’s homepage at http://kmail.kde.org.
The folders on the left side of the KMail screen allow you to view emails you have received,
emails ready to be sent, emails you have sent, and more.
To compose a mail, click on the new message icon in the tool bar:
Chapter 7. Email Applications 73
Once you have composed a message and entered an email address to send the email to, click
You can also launch Mozilla Mail Message from the GNOME main menu by going to Pro-
grams => Internet => Mozilla Mail Message.
To send an email, click on the Send button or go to File => Send Now or Send Later. If you
choose to send later, you can go back to the main mail screen and go to File => Send unsent
messages.
To read email, click on the mail folder you created for yourself to see a list of messages
waiting for you. Then, click on the message you want to read.
Once you read a message, you can delete it, save it to a separate folder, and more.
Chapter 7. Email Applications 75
Enter your name and email address on the next screen and click Next. On the following
screen, enter the name of your news server (if you do not know the name of your news
server, contact your Internet service provider for this information). On the last few screens,
you can determine the name that this account will be referred to and review your settings.
Now the newsgroup account you just created will appear in the sidebar of the Mozilla mail
screen. Right-click on this account name and select Subscribe. A dialog box appears, listing
all the newsgroups available. Select the ones you want and click on Subscribe. When you
are done, click on OK.
Now, click on the arrow next to the newsgroup account name and the list of groups you are
subscribed to will appear beneath. Select the newsgroup you want to access and a dialog
box appears with information about downloading and reading existing messages. Posting
to a newsgroup is just like writing an email, except that the newsgroup name appears in the
To field rather than an email address. To unsubscribe from a newsgroup, right-click on the
group name and select Unsubscribe.
(GUI). The particular font can be specified, the layout is very controllable, textures, pictures
and backgrounds can be added; all this makes for a visually appealing message when it gets
to the recipient.
On the other hand, plain text email is just that — plain text. They are not fancy, there are no
pictures embedded in the email, there are no special fonts. Plain text emails are simple.
The term plain text refers to textual data in ASCII format. Plain text (also called clear text)
is the most portable format because it is supported by nearly every application on every
machine.
This chapter will discuss two plain text email clients, PINE and mutt.
Each pine screen has a similar layout: the top line tells you the screen name and additional
useful information, below that is the work area (on the Main Menu screen, the work area is
a menu of options), then the message/prompt line, and finally the menu of commands.
From the Main Menu you can choose to read online help, compose and send a message, look
at an index of your mail messages, open or maintain your mail folders, update your address
book, configure pine, and quit pine. There are additional options listed at the bottom of the
screen as well.
To write a message, press [C] (Compose). You see the Compose Message screen.
Chapter 7. Email Applications 77
Different commands are available to you when your cursor is in different fields on this
screen. To see additional commands available when your cursor is in the Message Text field,
type [Ctrl]-[G] (Get Help). For example, to move around, use the arrow keys or [Ctrl]-[N]
(Next line) and [Ctrl]-[P] (Previous line); to correct typing errors, use [Backspace] or [Delete].
In the command menu above, the ^ character is used to indicate the Control key. This char-
acter means you must hold down the Control ([Ctrl]) key while you press the letter for each
command.
When you want to leave Pine, press [Q] (Quit).
To view a message in the Message Index screen, use the arrow keys to highlight the message
you want to view. Press [V] (ViewMsg) or press [Enter] to read a selected message. To see
the next message, press [N] (NextMsg). To see the previous message, press [P] (PrevMsg) To
return from your message to the Message Index, press [I] (Index).
For addition help with pine, refer to the pine man page. To view this man page, type the
command man pine at a shell prompt.
uration file needs to exist in your home directory, it has to be called either ~/.muttrc or
~/.mutt/muttrc.
When you launch mutt, the first thing you see is a screen with a list of email messages. This
initial menu is called the index.
These messages are in a default mail folder, often called the mailspool, that you can think of
as your inbox. Use the [K] and [J] keys on your keyboard to move the highlighted cursor up
and down the list of messages.
In the index or pager views, use the [R] key to reply to a message or the [M] key to create a
new one. Mutt will prompt for the To: address and the Subject: line. A text editor (defined by
your $EDITOR environmental variable in the configuration file) will then launch allowing
you to compose your message. Type away, when you save and exit, you are done.
After the editor, mutt drops you into the compose menu, here you can fine-tune your mes-
sage headers, change the encoding, add file attachments or simply hit the [Y] key to say yes
and send your email on its way.
To learn more, refer to the man pages for muttrc and mutt (type man muttrc or man mutt at
the shell prompt). You may also find the mutt manual to be very helpful. The mutt manual is
installed in /usr/share/doc/mutt-1.2.x , where x is the version number of mutt installed
on your system.
Chapter 8.
Printer Configuration
This chapter provides information on configuring, testing, and modifying a local printer
with printconf. For information on configuring other types of printers, creating printer
aliases, and more, refer to the Official Red Hat Linux Customization Guide or click on the Help
button once you open the printconf application.
Red Hat Linux comes with two different printing systems: LPRng and CUPS. LPRng is the
default printing system. It is recommended that new users use the default printing system as
described in this chapter. For information on the CUPS printing system, refer to the Official
Red Hat Linux Customization Guide.
To use printconf, you must have root privileges. To start printconf, use one of the following
methods:
• On the GNOME desktop, select Main Menu Button (on the Panel) => Programs => Sys-
tem => Printer Configuration to start the graphical version.
• On the KDE desktop, select Main Menu Button (on the Panel) => System => Printer
Configuration to start the graphical version.
• Type the command printconf-gui at a shell prompt (for example, in an XTerm or a
GNOME terminal) to start the graphical version. 1
• You can also run printconf as a text-based application if you do not have the X Win-
dow System installed, or you just prefer the text-based interface. To run it, log in as root
(or use the command su to temporarily change to the root user), and type the command
/usr/sbin/printconf-tui from a shell prompt.
Important
Do not edit the /etc/printcap file. Each time the printer daemon (lpd) is started or restarted, a new
/etc/printcap file is dynamically created.
If you want to add a printer without using printconf, edit the /etc/printcap.local file.
The entries in /etc/printcap.local are not displayed in printconf but are read by the
printer daemon. If you upgrade your system from a previous version of Red Hat Linux, your
existing configuration file is converted to the new format used by printconf. Each time a new
configuration file is generated by printconf, the old file is saved as /etc/printcap.old.
• Local Printer — a printer attached directly to your computer through a parallel or USB
port. In the main printer list as shown in Figure 8-1, the Queue Type for a local printer is
set to LOCAL.
• Unix Printer (lpd Spool) — a printer attached to a different UNIX system that can be
accessed over a TCP/IP network (or example, a printer attached to another Red Hat Linux
system on your network). In the main printer list as shown in Figure 8-1, the Queue Type
for a remote UNIX printer is set to LPD.
• Windows Printer (SMB) — a printer attached to a different system which is sharing a
printer over a SMB network (for example, a printer attached to a Microsoft Windows
machine). In the main printer list as shown in Figure 8-1, the Queue Type for a remote
Windows printer is set to SMB.
• Novell Printer (NCP Queue) — a printer attached to a different system which uses Nov-
ell’s NetWare network technology. In the main printer list as shown in Figure 8-1, the
Queue Type for a remote Novell printer is set to NCP.
• JetDirect Printer — a printer connected directly to the network instead of to a computer.
In the main printer list as shown in Figure 8-1, the Queue Type for a JetDirect printer is
set to JETDIRECT.
See the Official Red Hat Linux Customization Guide or click on the printconf Help button for
information on configuring printers other than local.
Important
If you add a new print queue or modify an existing one, you need to restart the printer daemon (lpd)
for the changes to take effect.
Clicking the Apply button saves any changes that you have made and restarts the printer
daemon. The changes are not written to the /etc/printcap configuration file until the
printer daemon (lpd) is restarted. Alternatively, you can choose File => Save Changes and
then choose File => Restart lpd to save your changes and then restart the printer daemon.
Chapter 8. Printer Configuration 81
If a printer appears in the main printer list with the Queue Type set to INVALID, the printer
configuration is missing options that are required for the printer to function properly. To
remove this printer from the list, select it from the list and click the Delete button.
You will then see the screen shown in Figure 8-3. Enter a unique name for the printer in the
Queue Name text field. This can be any descriptive name for your printer. The printer name
cannot contain spaces and must begin with a letter a through z or A through Z. The valid
characters are a through z, A through Z, 0 through 9, -, and _.
Select Local Printer from the Queue Type menu, and click Next.
82 Chapter 8. Printer Configuration
printconf attempts to detect your printer device and display it as shown in Figure 8-4. If your
printer device is not shown, click Custom Device. Type the name of your printer device and
click OK to add it to the printer device list. After selecting your printer device, click Next.
Next, printconf will try to detect which printer is attached to the printer device you selected
as shown in Figure 8-5. If it detects the wrong printer or does not detect any printer, you can
manually select one. The printers are divided by manufacturers. Click the arrow beside the
manufacturer for your printer. Find your printer from the expanded list, and click the arrow
beside the printer name. A list of drivers for your printer will appear. Select one. If you do
not know which one to use, select the first one in the list. If you are having problems using
that driver, edit the printer in printconf and select a different driver.
Chapter 8. Printer Configuration 83
The last step is to confirm your printer. Click Finish if this is the printer that you want to
add. Click Back to modify your printer configuration.
The new printer will appear in the printer list in the main window. Click the Apply but-
ton in the main window to save your changes to the /etc/printcap configuration file and
restart the printer daemon (lpd). After applying the changes, print a test page to ensure the
configuration is correct. Refer to Section 8.1.1 for details.
on the toolbar. The default printer icon appears in the first column of the printer list
beside the default printer.
If you want to modify an imported printer’s settings, you cannot modify its settings directly.
You must override the printer. You can only override an imported printer that has been
imported using the alchemist libraries. Imported printers have the symbol beside them
in the first column of the printer list.
To override the printer, select the printer, and choose File => Override Queue from the
pulldown menu. After overriding a printer, the original imported printer will have the
84 Chapter 8. Printer Configuration
Depending on which queue type you choose, you will see different different options. Refer
to the appropriate section on adding a printer for a description of the options.
8.2.3. Driver
The Driver tab shows which print driver is currently being used. This is the same list that
you used when adding the printer. If you change the print driver, click OK to return to the
main window. Click Apply to save the change and restart the printer daemon.
If you are having problems printing, try selecting a different driver from this list and printing
a test page. Some drivers might work better than others for your printer.
• Send Form-Feed (FF) should be selected if the last page of your print job is not ejected from
the printer (for example, the form feed light flashes). If this does not work, try selecting
Send End-of-Transmission (EOT) instead. Some printers require both Send Form-Feed
(FF) and Send End-of-Transmission (EOT) to eject the last page.
• Send End-of-Transmission (EOT) if sending a form-feed does not work. Refer to Send FF
above.
• Assume Unknown Data is Text should be selected if your print driver does not recognize
some of the data sent to it. Only select it if you are having problems printing. If this option
is selected, the print driver will assume that any data that it can not recognize is text and
try to print it as text. If you select this option and Convert Text to Postscript, the print
driver will assume the unknown data is text and then convert it to PostScript.
• Prerender Postscript should be selected if you are printing characters beyond the basic
ASCII set but they are not printing correctly (such as Japanese characters). This option
will prerender non-standard PostScript fonts so that they are printed correctly.
If your printer does not support the fonts you are trying to print, try selecting this option.
For example, you should select this option if you are printing Japanese fonts to a non-
Japanese printer.
Extra time is required to perform this action. Do not choose it unless you are having prob-
lems printing the correct fonts.
• Convert Text to Postscript is selected by default. If your printer can print plain text, try
unselecting this when printing plain text documents to decrease the time it takes to print.
• Page Size allows you to select the paper size for your printer such as US Letter, US Legal,
A3, and A4.
• Effective Filter Locale defaults to C. If you are printing Japanese characters, select ja_JP.
Otherwise, accept the default of C.
If you modify the driver options, click OK to return to the main window. Click Apply to
save the change and restart the printer daemon.
86 Chapter 8. Printer Configuration
• man printcap — The manual page for the /etc/printcap printer configuration file.
• Official Red Hat Linux Customization Guide
The CD player interface acts like a standard CD player, with play, pause, and stop functions.
A volume control slider is located at the bottom of the interface. You can also edit the track
listings for your CDs and change the way the utility functions by clicking on the Open Track
Editor and Preferences buttons and making your selections.
Set your preferences to use CDDB to have the CD title located in an extensive online database
and its song titles listed in the GUI (if the CD title and songs do not appear in the GUI, the
CD is not in the database). The first time you play a CD, you will need to be online for this
feature to work; the information will be stored and displayed in the future whether you are
online or not.
XMMS can be used for more than just playing MP3 audio files. By default XMMS can play
MPEG audio, Ogg Vorbis, RIFF wav, most module formats, and a few other formats. XMMS
can be extended through plugins to play a number of other audio and video formats.
To learn more about XMMS, refer to the XMMS man page by typing man xmms at the shell
prompt.
88 Chapter 9. Audio, Video, and General Amusement
To launch XMMS in GNOME, go to Main Menu => Programs => Multimedia => XMMS.
To launch XMMS from a shell prompt, type the command xmms.
Note
Many sound cards are supported for Red Hat Linux, but there are sound cards that are not completely
compatible, or even compatible at all. If you are having trouble configuring your sound card, check
the Hardware Compatibility List at http://hardware.redhat.com/ to see if your card is supported.
The sndconfig utility probes your system for sound cards. If the utility detects a plug and
play sound card, it will automatically try to configure the correct settings by playing sound
samples. If you can hear the samples, just select Ok when instructed and your sound card
configuration is complete.
If the probe does not find any cards, you will be presented with a list from which you can
select your card. Use the [Up Arrow] and [Down Arrow] keys to scroll through the list.
If your card is listed, highlight it, then press [Enter] (or [Tab] to the Ok button and press
[Enter]).
Your next task will be to select the correct I/O port, IRQ, and DMA settings. These settings
are determined by the jumper settings of the sound card. You can find information about
these settings in your sound card documentation. If you share your machine with Windows,
you can also find your sound card’s settings in the Device Manager tab, in the System sec-
tion of your Control panel.
Once you have selected the right settings for your card, you will be presented with sound
samples. If you hear the samples, select Ok and sound configuration is complete.
After your card is configured, type exit. You will be returned to your user account.
alias sound sb
alias midi opl3
options opl3 io=0x388
options sb io=0x220 irq=7 dma=0,1 mpu_io=0x300
Caution
Xconfigurator will overwrite your system’s original video configuration file. As a safety measure, be
sure to make a backup of the /etc/X11/XF86Config file before running Xconfigurator.
To run Xconfigurator, log in as root and type Xconfigurator at a shell prompt. Follow
the instructions that appear on the screen. Make your selections using the [Tab] and [Enter]
keys.
When you have finished reconfiguring your video card, log out of root and log back in to
your user account.
9.5. Games
The games and amusing applets give you fun ways to pass the time.
GNOME’s games are not divided into categories, but the variety is still there with games like
Free Cell, Tux Racer, Chess, and the arcade-style game that covers your entire desktop—
Penguin Command.
To open games in GNOME, go to Main Menu => Programs => Games.
KDE’s games are broken down into categories: Arcade games, like Asteroids; Cardgames,
like poker; Boardgames, like backgammon and mahjongg; and Tactics & Strategy games,
like minesweeper.
In KDE, go to Main Menu => Games. Many games include rules and tips within the menu
options.
9.6. Amusements
Computer programmers can be very entertaining people. Applets, or small applications, are
created and added to software for no other reason than to amuse.
90 Chapter 9. Audio, Video, and General Amusement
Most of these are on-screen toys, like GNOME’s Wanda The Fish, which opens a dialog
box displaying a quote that changes every time you click on the icon, and KDE’s AMOR,
which places a little smiley face (or another creature of your choice) on the top border of
your desktop’s active window that interacts with you.
Other applets you may find to be very useful; KDE’s World Clock presents a map of the
world and time zone information just by scrolling your mouse around the map, and
GNOME’s GNOME Weather displays a mini weather report on the panel.
Figure 9-5. World Clock, a KDE toys that displays time zone information
To access applets in GNOME, go to Main Menu => Applets and look through the programs
available in Amusements and Utility. Applets include Game of Life, Where Am I, Odome-
ter, and GNOME Weather.
KDE has a main menu option called Toys where you will find AMOR, Potato Guy, Tea
Cooker, and more.
• http://www.lokigames.com/
• http://www.linuxquake.com/
• http://www.tuxgames.com
• http://www.linuxgamingnews.com/
• http://happypenguin.org/
You can also browse the Internet for "linux games" using a search engine, such as
http://www.google.com.
92 Chapter 9. Audio, Video, and General Amusement
Chapter 10.
Working with Images
There are several types of image files. Some images are created using sophisticated software
packages, while others are made from digital cameras and scanners. You may have down-
loaded some of these image files from the Internet or received them in an email. You may
also want to create your own images to send to others. You can view and manipulate the
most common types of image files using the many applications included in Red Hat Linux.
Double-click on any thumbnail icon to view the image in its native size. The image will
load within the browser window, along with a thumbnail view and detailed file information
along the left panel. Below the file information are advanced options for working with the
94 Chapter 10. Working with Images
file. By default, Nautilus offers you the option of opening the file with Electric Eyes, a robust
image viewer with more advanced imaging features than Nautilus. You can also open the
file with the GIMP, a powerful image manipulation application. More information about
using the GIMP can be found in Section 10.2.
To increase and decrease the size of the viewed image in Nautilus, click on the magnifying
glass icon on the location bar as shown in Figure 10-2:
Click the + icon to increase the size of the image or - to decrease it.
file manager:
Konqueror works similarly to Nautilus. Image files within a folder are displayed
as automatically-generated thumbnail icons within the browser. When you click on a
thumbnail icon, the browser displays the image in its native size, as shown in Figure 10-3.
To zoom in and out of images within Konqueror, you first need to change the way it renders
the image. From the top toolbar, choose View => View Mode => Image Viewer. This will
re-display the image and allow for zooming in and out using the two magnifying glass icons
on the toolbar, as shown in Figure 10-4.
You can also open the image with more advanced image viewers, as well as with the GIMP.
Right-click on the image and choose Open With.... A pop-up menu will appear allowing you
to open the application you wish to use. To launch the GIMP, choose Graphics and scroll
down the list of applications. Click on the GIMP icon and click OK, as seen in Figure 10-5.
• JPG/JPEG
• GIF
• PGM
• XPM
• PNG
• PCX
• TIF/TIFF
• PPM
• BMP
GQview is useful for viewing individual image files as well as browsing collections of files
in folders. It supports zoom in and zoom out functions, as well as thumbnail views of all
image files within a directory. It also supports several advanced options not found in the
simple image viewers listed above.
GQview can be started from the GNOME and KDE panels. Choose Main Menu => Pro-
grams => Graphics => GQview to start the application in GNOME. For KDE users, choose
96 Chapter 10. Working with Images
Start Application => Programs => Graphics => GQview. If you are at a shell or terminal
prompt, start the application by typing gqview. Upon start-up, GQview will browse your
user home directory by default. If you have any images in this directory, the gallery panel
will automatically generate thumbnails for you to highlight and view in the main display
area.
The interface of GQview is simple and straightforward. The toolbar allows you to fit the
image to the display window, zoom in and out and toggle between thumbnail view and
text-only browser panels. It also has a text field for you to enter a particular path to your
image directories. Right-clicking on an image in the display area opens a pop-up menu of
image size and other file options such as renaming, moving, copying. You can also hide
and unhide the thumbnail file panel and toggle windowed and fullscreen modes within the
pop-up menu.
You can also combine functions within GQview and create a dynamic presentation effect for
groups of images within a directory. In the text field below the toolbar, type the path to the
the directory where your images are located and highlight the first image in the thumbnail
file list panel on the left. Now press [V] then [S], and you will start a full-screen slideshow
where GQview displays images against a black background over your entire desktop. By
default, each image in the slideshow is presented for 15 seconds. You can stop and resume
the slideshow at any time by pressing [S]. When the slideshow ends, press [V] to exit full-
screen mode.
GQview can also be used to change your desktop wallpaper quickly and easily. Right-click
on the image and choose Edit => Set as wallpaper. From the Edit menu, you can also choose
to open the file with a number of image editing utilities, including the GIMP, Electric Eyes,
Xview, and Xpaint.
GQview also allows you to customize several settings by clicking the Configure button:
The configuration pop-up menu allows advanced users to configure several options. You
can customize a directory on startup, change thumbnail sizes, and even change the default
image editors to manipulate the file if you would like to use one that is not listed.
Chapter 10. Working with Images 97
Buttons along the bottom of the Editing Control window let you zoom in and out of an
image incrementally by percentage, fit the image to the screen, and even turn the image 90%
98 Chapter 10. Working with Images
clockwise, or invert (flip) the image horizontally or vertically. Electric Eyes is an ideal choice
for viewing and manipulating single images.
The Load Image dialog displays your working directory — the directory you were in when
the GIMP was launched. You can navigate up and down the file system tree by double-
clicking on the Directories list on the left, then selecting a file to open from the Files list on
the right.
File name completion is supported by the GIMP. If you type the first letter (or more) of a
file name into the Selection field and press the [Tab] key, the view will change to only those
subdirectories and/or files beginning with that letter or letters.
The file you select will appear in the Selection field near the bottom of the dialog. A thumb-
nail preview will be displayed on the dialog; alternatively, you will see a Generate Preview
button. If you want to see a thumbnail of the image, click on the Generate Preview button.
Once you have selected a file, click on the OK button to open it. You can also double-click
on a file name to open it.
The Toolbox also has several easily accessible functions. Using the Toolbox, you can add
text to images, erase regions of an image, or even fill selected regions with the color of your
choice.
For example, if you wish to add text to a file, select the button and click on your image.
This will load the Text Tool dialog box, where you can choose a font and type some text in
the provided text box. Click OK and your text will be displayed in as a floating section on
the image. You can then move the text to the position you wish using the Move Layers tool.
Figure 10-12 shows our photo with exciting new text:
As you can see, the GIMP is a powerful imaging tool, and it takes some time to master all
of the functions. Try exploring some of the options yourself. If you make a mistake, do not
worry. You can always undo your mistakes by right-clicking on the image and choosing Edit
=> Undo.
• The Artists’ Guide to the GIMP by Michael J. Hammel; Frank Kasper and Associates, Inc.
• GIMP Essential Reference by Alex Harford; New Riders Publishing
• GIMP for Linux Bible by Stephanie Cottrell Bryant, et al; Hungry Minds, Inc.
• GIMP: The Official Handbook by Karin Kylander and Olof S. Kylander; Coriolis Group
• Grokking the GIMP by Carey Bunks; New Riders Publishing
• Sams Teach Yourself GIMP in 24 Hours by Joshua and Ramona Pruitt; Sams
102 Chapter 10. Working with Images
Chapter 11.
Shell Prompt Basics
This section explains how to navigate, manipulate files, perform simple administration tasks,
and other shell prompt basics.
When the Free Software Foundation sought a royalty-free shell, developers began to work
on the language behind the Bourne shell as well as some of the popular features from other
shells available at the time.
The result was the Bourne Again Shell, or bash. Although your system came with several
different shells, bash is the default shell for Red Hat Linux. You can learn more about bash
by reading the bash man page (type man bash at a shell prompt).
Although your system came with several different shells, bash is the default shell for Red
Hat Linux.
Figure 11-2. The Command pwd Shows You Where You Are
To determine the exact location of your current directory within the file system, go to a shell
prompt and type the command pwd.
You should see something like:
/home/sam
This tells you that you are in the user sam’s directory, which is in the /home directory.
The command pwd stands for print working directory. When you typed pwd, you asked your
Linux system to display your current location. Your system responded by printing the name
of the current directory in the terminal window, also known as the standard output.
You will find that using pwd is very helpful as you learn to navigate your new Linux system.
current directory, wherever that may be. The tree below is used only as an example for the
purpose of explaining cd.
/
directory1
directory2
directory3
If you are currently in directory3 and you want to switch to directory1, you need to move
up in the directory tree.
Executing the command
cd directory1
while you are in directory3, will present you with an error message explaining that there
is no such directory. This is because there is no directory1 below directory3.
To move up to directory1, type:
cd /directory1
This is an example of an absolute path. It tells Linux to start at the top (/) and look down
until it finds directory1. A path is absolute if the first character is a /. Otherwise, it is a
relative path.
Absolute paths will take you to any directory, from any directory. Relative paths will only
take you to directories below your current one.
Use the following exercise to test what you have learned so far regarding absolute and rela-
tive paths. From your home directory, type the relative path:
cd ../../etc/X11
The command cd .. tells your system to go up to the directory immediately above the one
in which you are currently working. cd ../.. tells it to go up two directories.
After using the full command in the example, you should be in the directory /X11, which is
where you will find configuration files and directories related to the X Window System.
Take a look at your last cd command. You told your system to:
cd /etc/X11
Note
Always make sure you know which working directory you are in before you state the relative path to
the directory or file you want to get to. You do not have to worry about your position in the file system,
though, when you state the absolute path to another directory or file. If you are not sure, type pwd.
106 Chapter 11. Shell Prompt Basics
Command Function
cd returns you to your login directory
cd ~ also returns you to your login directory
cd / takes you to the entire system’s root directory
cd /root takes you to the home directory of the root, or
superuser, account created at installation
cd /home takes you to the home directory, where user login
directories are usually stored
cd .. moves you up one directory
cd ~otheruser takes you to otheruser’s login directory, if otheruser
has granted you permission
cd /dir1/subdirfoo regardless of which directory you are in, this
absolute path would take you straight to subdirfoo,
a subdirectory of dir1
cd ../../dir3/X11 this relative path would take you up two directories
to root, then to dir3, then to the X11 directory.
Now that you are starting to understand how to change directories, see what happens when
you change to root’s login directory (the superuser account). Type:
cd /root
If you are not logged in as root, you are denied permission to access that directory.
Denying access to the root and other users’ accounts (or login directories) is one way your
Linux system prevents accidental or malicious tampering. See Section 11.14.
To change to the root login and root directory, use the su command. For example:
[sam@halloween sam]$su
Password:your root password
[root@halloween sam]#cd /root
[root@halloween /root]#
Tip
The command su means substitute users and it allows you to temporarily log in as another user.
When you type su all by itself and press [Enter], you become root (also called the superuser) while
still inside your login shell (your user’s home directory). Typing su - makes you become root with
root’s login shell — that is, it is as if you had logged in as root originally.
As soon as you give the root password, you will see the changes in your command prompt
to show your new, superuser status, the root account designation at the front of the prompt
and "#" at the end (as shown in the prior example).
Chapter 11. Shell Prompt Basics 107
When you are done working as root, type exit at the prompt and you will return to your
user account.
[root@halloween /root]#exit
exit
[sam@halloween sam]$
Tip
To see all the options of the ls command, you can read the man page by typing man ls at a shell
prompt. If you want to print the man page, at the prompt type man ls | col -b | lpr.
Type the command ls -a. Now you will see files that begin with dots.
Hidden files are mostly configuration files which set preferences in programs, window man-
agers, shells, and more. The reason they are hidden is to help prevent any accidental tam-
pering by the user. When you are searching for something in a directory, you are not usually
looking for these configuration files, so keep them hidden to help avoid some screen clutter.
Viewing all the files using the ls -a command can give you plenty of detail, but you can
view still more information, simply by adding more than one option.
If you want to see the size of a file or directory, when it was created and more, just add the
long option (-l) to the ls -a command:
ls -al
This command shows the file creation date, its size, ownership, permissions, and more.
108 Chapter 11. Shell Prompt Basics
You do not have to be in the directory whose contents you want to view to use the ls com-
mand. For example, to see what is in the /etc directory from your home directory, type:
ls -al /etc
Here is a short list of some popular options to use with ls. Remember, you can view the full
list by reading the ls man page (man ls).
• -a — all. Lists all the files in the directory, including the hidden files (.filename). The
.. and . at the top of your list refer to the parent directory and the current directory,
respectively.
• -l — long. Lists details about contents, including permissions (modes), owner, group,
size, creation date, whether the file is a link to somewhere else on the system and where
its link points.
• -F — file type. Adds a symbol to the end of each listing. These symbols include / to
indicate a directory; @ to indicate a symbolic link to another file; and * to indicate an
executable file.
• -r — reverse. Lists the contents of the directory from back to front.
• -R — recursive. This recursive option lists the contents of all directories (below the current
directory) recursively.
• -S — size. Sorts files by their size.
A little later in this chapter, when we introduce you to pipes (see Section 11.10) and I/O
redirections2-managing-io (see Section 11.11.4), you will discover that there are other ways
to view the contents of a directory.
locate finger
Chapter 11. Shell Prompt Basics 109
The locate command uses a database to locate files and directories that have the word fin-
ger in the file or directory name. The search results could include a file called finger.txt,
a file called pointerfinger.txt, a directory named fingerthumbnails, and so on.
Tip
To learn more about locate, read the locate man page (type man locate at a shell prompt).
The locate command works very quickly, as long as the database is up to date. That
database is automatically updated on a nightly basis, from cron. Cron is a small program
that runs in the background, performing various tasks, such as updating the locate
database, at regularly scheduled intervals.
Tip
Cron is a daemon that executes tasks at regularly scheduled intervals. To read the cron man page,
type man cron at the shell prompt.
Cron periodically updates the slocate database, which is used to catalog file location.
Switching between operating systems and shutting down your machine at the end of the
day can interfere with this automatic database update.
To update the database manually, log in as root (type su at a shell prompt and then your root
password) and type the command updatedb.
After a few minutes, the slocate database that is used by the locate command will be
current.
Note
You can run anacron to have your system execute commands periodically, with a frequency specified
in days. Unlike cron, it does not assume that the machine is running continuously. Hence, it can be
used on machines that are not running 24 hours a day, to control daily, weekly, and monthly jobs that
are usually controlled by cron.
Read the man page on anacron (type man anacron at the command line) for more information.
[sam@halloween sam]$cat
sneakers.txt
buy some sneakers
then go to the coffee shop
then buy some coffee
Chapter 11. Shell Prompt Basics 111
Press [Enter] to go to an empty line and use the [Ctrl]-[D] keys to quit cat.
Notice the difference (see Figure 11-5)? There are no double entries. That is because the
standard output from cat was redirected. That redirection was to a brand new file you made
called sneakers.txt.
You can find the file in the directory you were in when you started cat (type ls if you want
to see it listed).
As you learned earlier, you can then use cat to read the file. At the prompt, type:
cat sneakers.txt
Caution
Be careful when you redirect the output to a file, because you can easily overwrite an existing file!
Make sure the name of the file you are creating does not match the name of a pre-existing file, unless
you want to replace it.
Use output redirection again for another file and call it home.txt. For this example, type the
following:
Now, on an empty line, use the [Ctrl]-[D] key combination again to quit cat.
Next, use cat to join home.txt with sneakers.txt and redirect the output of both files to
a brand new file called saturday.txt (you will find an example in Figure 11-6). Type the
following:
You can see that cat has added home.txt where sneakers.txt ended.
Now check the file using the command cat sneakers.txt. The final output shows the con-
tents of home.txt at the end of the file.
The command you typed told the system to append the output from the file home.txt to the
file sneakers.txt.
By appending the output, you save yourself time (and a bit of disk clutter) by using existing
files, rather than creating a new file.
Compare the results of the files sneakers.txt and saturday.txt now, and you will see that
they are identical. To make your comparison, type:
The contents of both files will be displayed — first sneakers.txt, then saturday.txt (as
shown in Figure 11-7).
Chapter 11. Shell Prompt Basics 113
cat sneakers.txt
Because you used the less-than symbol ( ) to separate the cat command from the file, the
output of sneakers.txt was read by cat.
ls -al /etc
How do you get a closer look at the output before it moves off the screen?
One way is to pipe the output to a utility called less. Known as a pager, less allows you to
view information one page (or screen) at a time.
Use the vertical bar (|) to pipe the commands.
Now we can view the contents of one /etc screen at a time. To move forward a screen, press
[Space]; to move back a screen, press [b]; to quit, press [q]. You can use the [left] and [right]
arrow keys to navigate as well.
114 Chapter 11. Shell Prompt Basics
Tip
To read startup messages more closely, at a shell prompt, type dmesg | less. You will be able to
read the file one screen at a time. To move forward, press the [Spacebar]; to quit, press [Q].
Pipes can also be used to print only certain lines from a file. Type:
This will print every line in the sneakers.txt file that mentions the word "coffee" (read
more about grep in Section 11.11.3).
Use the [Spacebar] to move forward through the pages. Press [q] to exit.
head filename
Chapter 11. Shell Prompt Basics 115
head can be a useful command, but because it is limited to the first several lines, you will
not see how long the file actually is. By default, you can only read the first ten lines of a file.
You can change the number of lines displayed by specifying a number option, as shown in
the following command:
You would see every line in that file where the word "coffee" is found.
Tip
Unless otherwise specified, grep searches are case sensitive. That means that searching for Coffee
is different than searching for coffee. So among grep’s options is -i, which allows you to make a
case-insensitive search through a file. Read the grep man page for more about this command.
Tip
To read more about wildcards and regular expressions, take a look at the bash man page (man bash).
Remember that you can save the file to a text file by typing man bash | col -b bash.txt. Then,
you can open and read the file with less or pico (pico bash.txt). If you want to print the file, be
aware that it is quite long.
116 Chapter 11. Shell Prompt Basics
ls sneak*.txt
sneakers.txt
You will probably use the asterisk (*) most frequently when you are searching. The asterisk
will search out everything that matches the pattern you are looking for. So even by typing:
ls *.txt
or:
ls sn*
You would find sneakers.txt and any other files whose names begin with sn or ends with
.txt. It helps to narrow your search as much as possible.
One way to narrow a search is to use the question mark symbol (?). Like the asterisk, using
? can help locate a file matching a search pattern.
In this case, though, ? is useful for matching a single character, so if you were searching
for sneaker?.txt, you would get sneakers.txt as a result, and/or sneakerz.txt, if there
were such a filename.
Regular expressions are more complex than the straightforward asterisk or question mark.
When an asterisk, for example, just happens to be part of a filename, as might be the case
if the file sneakers.txt was called sneak*.txt, that is when regular expressions can be
useful.
Using the backslash (\), you can specify that you do not want to search out everything by
using the asterisk, but you are instead looking for a file with an asterisk in the name.
If the file is called sneak*.txt, type:
sneak\*.txt
Try it by taking a look again at sneakers.txt (created in Section 11.9.1. The first time, how-
ever, at the shell prompt, type:
cat sneakrs.txt
Nothing happens, of course, because there is no sneakrs.txt file. No problem. We will just
use the up-arrow key to bring back the command, then use the left-arrow key to get to the
point where we missed the "e." Insert the letter and press [Enter] again.
We now see the contents of sneakers.txt.
By default, up to 500 commands can be stored in the bash command line history file.
Tip
By typing the env command at a shell prompt, we can see the environment variable that controls
the size of the command line history. The line which reads, HISTFILESIZE=500 shows the number of
commands that bash will store.
The command line history is actually kept in a file, called .bash_history in our login direc-
tory. We can read it in a number of ways: by using pico, cat, less, more, and others.
Be aware that the file can be long. To read it with the more command, from your home
directory type:
more .bash_history
To move forward a screen, press [Space]; to move back a screen, press [b]; to quit, press [q].
Tip
To find a command in your history file without having to keep hitting the arrow keys or page through
the history file, use grep, a powerful search utility (see Section 11.11.3. Here is how you can quickly
find a previously used command: say you are searching for a command that is similar to cat sneak-
something. You have used the command and you think it might be in your history file. At the shell
prompt, type:
Another time-saving tool is known as command completion. If you type part of a file, com-
mand, or pathname and then press the [Tab] key, bash will present you with either the re-
maining portion of the file/path, or a beep (if sound is enabled on your system). If you get a
beep, just press [Tab] again to obtain a list of the files/paths that match what has been typed
so far.
For example, if you forget the command updatedb, but remember a portion of the command,
you can su to root, then at the shell prompt, type up, press the [Tab] key twice and you will
see a list of possible completions, including updatedb and uptime. By typing the partial
command upd and pressing [Tab] again, your command is completed for you.
118 Chapter 11. Shell Prompt Basics
Remember that commands are case sensitive, so the command to start Mozilla must be in
lowercase to start the browser. You will see something like this:
The discrepancy between the two results from the date command shows that you were
using Mozilla for just over an hour.
That was one demonstration of Linux’s security features. Linux, like UNIX, is a multi-user
system, and file permissions are one way the system protects against malicious tampering.
One way to gain entry when you are denied permission is to su to root, as you learned
earlier. This is because whoever knows the root password has complete access.
[sam@halloween sam]$su
Password: your root password
[root@localhost sam]#cd /root
[root@localhost /root]#
But switching to superuser is not always convenient, or wise, since it is easy to make mis-
takes and alter important configuration files.
All files and directories are "owned" by the person who created them. You created the file
sneakers.txt (see Section 11.9.1) in your login directory, so sneakers.txt "belongs" to you.
That means you can specify who is allowed to read the file, write to the file, or (if it is an
application instead of a text file) who can execute the file.
Reading, writing, and executing are the three main settings in permissions. Since users are
placed into a group when their accounts are created, you can also specify whether certain
groups can read, write to, or execute a file.
Chapter 11. Shell Prompt Basics 119
Take a closer look at sneakers.txt with the ls command using the -l (long) option (see
Figure 11-9).
There is a lot of detail provided here. You can see who can read (r) and write to (w) the file, as
well as who created the file (sam), and to which group the owner belongs (sam). Remember
that, by default, the name of your group is the same as your login name.
Other information to the right of the group includes file size, date and time of file creation,
and file name.
The first column shows current permissions; it has ten slots. The first slot represents the
type of file. The remaining nine slots are actually three sets of permissions for three different
categories of users.
-rw-rw-r--
Those three sets are: the owner of the file, the group in which the file belongs, and "others,"
meaning users and groups not yet specified.
The first item, which specifies the file type, can show one of the following:
• d — a directory
• -(dash) — a regular file (rather than directory or link)
• l — a symbolic link to another program or file elsewhere on the system
Beyond the first item, in the following three sets, you will see one of the following:
When you see a dash in owner, group, or others, it means that particular permission has not
been granted. Look again at the first column of sneakers.txt and identify its permissions.
The file’s owner (in this case, sam) has permission to read and write to the file. The group,
sam, has permission to read and write to sneakers.txt, as well. It is not a program, so
neither the owner or the group has permission to execute it.
If you are the owner of the file or are logged into the root account you can change any
permissions for the owner, group, and others.
Right now, the owner and group can read and write to the file. Anyone outside of the group
can only read the file (r--).
Caution
Remember that file permissions are a security feature. Whenever you allow anyone else to read, write
to, and execute files, you are increasing the risk of files being tampered with, altered, or deleted. As
a rule, you should only grant read and write permissions to those who truly need them.
In the following example, you want to allow everyone to write to the file, so they can read it,
write notes in it, and save it. That means you will have to change the "others" section of the
file permissions.
Take a look at the file first. At the shell prompt, type:
ls -l sneakers.txt
The o+w command tells the system you want to give others write permission to the file
sneakers.txt. To check the results, list the file’s details again. Now, the file looks like this:
Now, everyone can read and write to the file (Figure 11-10).
Chapter 11. Shell Prompt Basics 121
To remove read and write permissions from sneakers.txt use the chmod command to take
away both the read and write permissions.
By typing go-rw, you are telling the system to remove read and write permissions for the
group and for others from the file sneakers.txt.
The result will look like this:
Think of these settings as a kind of shorthand when you want to change permissions with
chmod, because all you really have to do is remember a few symbols and letters with the
chmod command.
Here is a list of what the shorthand represents:
Identities
u — the user who owns the file (that is, the owner)
g — the group to which the user belongs
o — others (not the owner or the owner’s group)
a — everyone or all (u, g, and o)
Permissions
r — read access
w — write access
x — execute access
Actions
+ — adds the permission
- — removes the permission
= — makes it the only permission
122 Chapter 11. Shell Prompt Basics
Want to test your permissions skills? Remove all permissions from sneakers.txt — for
everyone.
Removing all permissions, including your own, successfully locked the file. But since the file
belongs to you, you can always change its permissions back (see Figure 11-11).
Here are some common examples of settings that can be used with chmod:
Because you can not really "execute" a directory as you would an application, when you add
or remove execute permission for a directory, you are really allowing (or denying) permis-
sion to search through that directory.
To allow everyone read and write access to every file in the example directory tigger, type:
If you do not allow others to have execute permission to tigger, it will not matter who has
read or write access. No one will be able to get into the directory unless they know the exact
filename they want.
For example, type:
Now, if you check your work with ls -dl you will see that only others will be denied access
to the tigger directory.
• r=4
• w=2
• x=1
• -=0
When these values are added together, the total is used to set specific permissions. For ex-
ample, if you want read and write permissions, you would have a value of 6; 4 (read) + 2
(write) = 6.
For sneakers.txt, here are the numerical permissions settings:
The total for the user is six, the total for the group is six, and the total for others is four. The
permissions setting is read as 664.
If you want to change sneakers.txt so those in your group will not have write access, but
can still read the file, remove the access by subtracting two (2) from that set of numbers.
The numerical values, then, would become six, four, and four (644).
To implement these new settings, type:
ls -l
sneakers.txt
Now, neither the group nor others have write permission to sneakers.txt. To return the
group’s write access for the file, add the value of w (2) to the second set of permissions.
Warning
Setting permissions to 666 will allow everyone to read and write to a file or directory. Setting permis-
sions to 777 allows everyone read, write, and execute permission. These permissions could allow
tampering with sensitive files, so in general, it is not a good idea to use these settings.
Here is a list of some common settings, numerical values and their meanings:
• -rw------- (600) — Only the owner has read and write permissions.
• -rw-r--r-- (644) — Only the owner has read and write permissions; the group and others
have read only.
• -rwx------ (700) — Only the owner has read, write and execute permissions.
• -rwxr-xr-x (755) — The owner has read, write and execute permissions; the group and
others have only read and execute.
• -rwx--x--x (711) — The owner has read, write and execute permissions; the group and
others have only execute.
• -rw-rw-rw- (666) — Everyone can read and write to the file. (Be careful with these per-
missions.)
• -rwxrwxrwx (777) — Everyone can read, write, and execute. (Again, this permissions set-
ting can be hazardous.)
Here are some common settings for directories:
• drwx------ (700) — Only the user can read, write in this directory.
• drwxr-xr-x (755) — Everyone can read the directory, but its contents can only be changed
by the user.
Chapter 12.
Managing Files and Directories
The GNOME file manager Nautilus and the KDE file manager Konqueror are powerful
and important tools for managing files and directories. They are discussed in Chapter 2 and
Chapter 3, respectively. This chapter discusses the shell prompt commands that can be used
to manage files and directories on your Red Hat Linux system as well as how to view PDF
files.
Note
Due to system security, unless you are root, you will not be able to gain access to all system-level files
and directories. If you do not have the permission to open, delete, or execute a file, you will receive
an error message saying your access is denied. This is normal behavior.
Tip
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
home directory (/root) and the root directory for the entire file system (/). When you are speaking
to someone and using the term root, be sure you know which root you are talking about.
Unless you are a system administrator, you probably do not have permission to write to
the files and directories outside of your home directory. Certain directories are reserved for
specific purposes. For example, /home is the default location for users’ home directories.
Users that are not system administrators might find the following directories useful:
• /home — Default location for users’ home directories. For example, a user with the user-
name foo has the home directory /home/foo.
• /usr/share/doc — Location of documentation for installed packages. For
example, the documentation for the dateconfig software package is located in
/usr/share/doc/dateconfig- version-number .
126 Chapter 12. Managing Files and Directories
• /tmp — Reserved directory for all users to store temporary files. Files stored here are not
permanent. A system process removes old files from this directory on a periodic basis. Do
not write any files or directories that you want to keep here.
Your Red Hat Linux system is compatible with many other Linux distributions 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 learn more about the FHS, refer to the Official Red Hat Linux Reference Guide Reference
Guide. You can also visit the FHS website: http://www.pathname.com/fhs.
file saturday
It will display ASCII text, telling you it is a text file. Any file that is designated a text file
should be readable using the cat, more, or less commands.
Tip
To learn more about file, read the man page by typing man file.
For more information on helpful commands for reading files, see Chapter 11.
files and directories combined. If you do not have enough disk space on your computer, you
can compress files that you do not use very often or files that you want to save but do not
use anymore. You can even create an archive file and then compress it to save disk space.
Important
An archive file is not compressed, but a compressed file can be an archive file.
By convention, files compressed with gzip are given the extension .gz, files compressed
with bzip2 are given the extension .bz2, and files compressed with zip are given the exten-
sion .zip.
Files compressed with gzip are uncompressed with gunzip, files compressed with bzip2 are
uncompressed with bunzip2, and files compressed with zip are uncompressed with unzip.
bzip2 filename
bunzip2 filename.bz2
The above command compresses file1, file2, file3, and the contents of the
/usr/work/school directory
(assuming this directory exists) and put them in
filename.bz2.
Tip
For more information, type man bzip2 and man bunzip2 at a shell prompt to read the man pages for
bzip2 and bunzip2.
gzip filename
gunzip filename.gz
The above command compresses file1, file2, file3, and the contents of the
/usr/work/school directory
(assuming this directory exists) and put them in
filename.gz.
Tip
For more information, type man gzip and man gunzip at a shell prompt to read the man pages for
gzip and gunzip.
In this example, filename.zip represents the file you are creating and filesdir represents
the directory you want to put in the new zip file. The -r option specifies that you want to
include all files contained in the filesdir directory recursively.
To extract the contents of a zip file, type the following command:
unzip filename.zip
130 Chapter 12. Managing Files and Directories
You can zip multiple files and directories at the same time by listing them with a space
between each one:
The above command compresses file1, file2, file3, and the contents of the
/usr/work/school directory
(assuming this directory exists) and put them in
filename.zip.
Tip
For more information, type man zip and man unzip at a shell prompt to read the man pages for zip
and unzip.
In this example, filename.tar represents the file you are creating and files/directories
represents the files or directories you want to put in the archived file.
You can tar multiple files and directories at the same time by listing them with a space
between each one:
The above command would place all the files in the work and the school subdirectories of
/home/mine in a new file called filename.tar in the current directory.
To list the contents of a tar file, type:
This command does not remove the tar file, but it places copies of its contents in the current
working directory.
Remember, the tar command does not compress the files by default. To create a tarred and
bzipped compressed file, use the -j option:
tar files compressed with bzip2 are conventionally given the extension .tbz.
This command creates an archive file and then compresses it as the file filename.tbz. If
you uncompress the filename.tbz file with the bunzip2 command, the filename.tbz file
is removed and replaced with filename.tar.
You can also expand and unarchive a bzip tar file in one command:
tar files compressed with gzip are conventionally given the extension .tgz.
This command creates the archive file filename.tar and then compresses it as the file file-
name.tgz. (The file filename.tar is not saved.) If you uncompress the filename.tgz file
with the gunzip command, the filename.tgz file is removed and replaced with file-
name.tar.
You can expand a gzip tar file in one command:
Tip
Type the command man tar to read the man page for the tar command.
replacing source with the name of the file you want to copy, and destination
with the name of the directory where you want the file to go.
So, to copy the file sneakers.txt to the directory tigger/ in your home directory, move to
your home directory and type:
cp sneakers.txt tigger/
You can use both relative and absolute pathnames with cp. Our home directory is the parent
of the directory tigger; tigger is one directory down from our home directory.
Read the cp man page (man cp) for a full list of the options available with cp. Among the
options you can use with cp are the following:
• -i — interactive. Prompts you to confirm if the file is going to overwrite a file in your
destination. This is a handy option because it can help prevent you from making mistakes.
• -r — recursive. Rather than just copying all the specified files and directories, this will
copy the whole directory tree, subdirectories and all.
• -v — verbose. shows the progress of the files being copied.
Now that you have the file sneakers.txt in the tigger directory, use cp -i to copy the file
again to the same location.
To overwrite the file that is already there, press [Y] and then [Enter]. If you do not want to
overwrite the file, press [N] and [Enter].
• -i — interactive. This will prompt you if the file you have selected will overwrite an
existing file in the destination directory. This is a good option, because like the -i option
for cp, you will be given the chance to make sure you want to replace an existing file.
• -f — force. Overrides the interactive mode and moves without prompting. Unless you
know what you are doing, this option is dangerous; be very careful about using it until
you become more comfortable with your system.
• -v — verbose. Shows a list of the files being moved.
If you want to move a file out of your home directory and into existing another directory,
type the following (you will need to be in your home directory):
mv sneakers.txt tigger
Alternatively, the same command using absolute pathnames looks like mv sneakers.txt
/home/newuser /home/newuser/tigger.
Chapter 12. Managing Files and Directories 133
• -i — interactive. Prompts you to confirm the deletion. This option can stop you from
deleting a file by mistake.
• -f— force. Overrides interactive mode and removes the file(s) without prompting. This
might not be a good idea, unless you know exactly what you are doing.
• -v — verbose. Shows a list of files as they are being removed.
• -r — recursive. Will delete a directory and all files and subdirectories it contains.
To delete the file piglet.txt with the rm command:
rm piglet.txt
Warning
Once a file or directory is removed with the rm command, it is gone permanently and cannot be
returned.
Use the -i (interactive) option to give you a second chance to think about whether or not
you really want to delete the file.
You can also delete files using the wildcard *, but be careful, because you can easily delete
files you did not intend to throw away.
To remove a file using a wildcard, you would type:
rm pig*
The above command will remove all files in the directory which start with the letters pig.
You can also remove multiple files using the rm command. For example:
rm piglet.txt sneakers.txt
You can use rmdir to remove a directory (rmdir foo, for example), but only if the directory
is empty. To remove directories with rm, you must specify the -r option.
For example, if you want to recursively remove the directory tigger you would type:
rm -r tigger
If you want to combine options, such as forcing a recursive deletion, you can type:
rm -rf tigger
134 Chapter 12. Managing Files and Directories
A safer alternative to using rm for removing directories is the rmdir command. With this
command, you will not be allowed to use recursive deletions, so a directory which has files
in it will not be deleted.
Warning
The rm command can delete your entire file system! If you are logged in as root and you type the
simple command rm -rf /, you are in trouble; this command will recursively remove everything on
your system.
Read the rmdir man page (man rmdir) to find out more about this command.
Note
A quick way to convert PostScript to PDF is to open a shell prompt and type:
Type man ps2pdf at a shell prompt to view the man page on the ps2pdf tool. This gives you informa-
tion on a variety of conversion options.
Another popular PDF viewer is Adobe Acrobat Reader. While it is not included with Red
Hat Linux, you can download it free of charge at http://www.adobe.com/.
Chapter 13.
Updating and Adding Packages to Red Hat
Linux
Red Hat Linux consists of various software applications and utilities, known as RPM pack-
ages. A package is just a file that contains a software program.
This chapter explains three ways to update your system: using Red Hat Network, using the
online Errata List, and using the Red Hat Linux Installation CD-ROMs.
• Errata Alerts — learn when Security Alerts, Bug Fix Alerts, and Enhancement Alerts are
issued for all the systems in your network through the Basic interface
• Automatic email notifications — receive an email notification when an Errata Alert is is-
sued for your system
• Scheduled Errata Updates — schedule delivery of Errata Updates (with optional auto-
matic installation)
• Package installation — Schedule package installation on one or more systems with the
click of a button
• Red Hat Update Agent — use the Red Hat Update Agent to download the latest software
packages for your system (with optional package installation)
• Red Hat Network website — manage multiple systems, downloaded individual packages,
and schedule actions such as Errata Updates through a secure Web browser connection
from any computer.
To start using Red Hat Network, follow these three basic steps:
1. Create a System Profile by running the Red Hat Network Registration Client
(rhn_register) on the system that you want to register.
2. Log in to RHN at http://rhn.redhat.com/ and entitle the system to a service offering.
Everyone receives a free Red Hat Network account for one system. Additional accounts
must be purchased.
3. Start scheduling updates through the RHN website, or download and install Errata
Updates using the Red Hat Update Agent.
For more detailed instructions, read the Red Hat Network User Reference Guide available at
http://www.redhat.com/docs/manuals/RHNetwork/.
136 Chapter 13. Updating and Adding Packages to Red Hat Linux
su -
Next, use the rpm command to install the packages. The -Uvh options that follows the com-
mand specifies that you want to install or upgrade the package, that you want to see verbose
messages, and that you want to see hash marks (#) while the package is installing. In this ex-
ample, the documentation files, which all begin with rhl, would be installed. The string
rhl-*.rpm tells your system to install all files that begin with rhl and end in .rpm (* is
a wildcard and keeps you from having to type out each of the long file names manually).
In place of rhl you should put whatever comes before the first hyphen in the name of the
package you want to install.
Press [Enter]. Type exit at the command line and press [Enter] again. This takes you out of
the root login and back to your user account.
Now that the package is installed, it should appear in the appropriate place in the panel’s
main menu.
Refer to the Official Red Hat Linux Customization Guide for more information about RPM.
Chapter 14.
Frequently Asked Questions
This chapter answers some of the most common questions about using Red Hat Linux that
you may ask as you become more familiar with it. From changing your desktop screen size
to troubleshooting package installation problems, this chapter will ease you step-by-step
through some common tasks and get you on your way.
Some users feel that adding --color does more than add a splash of color; it gives a clue
about the types of files in a directory. For example, directories might all be a royal blue,
program files would be green, and so on.
Displaying the listing in color all the time involves a little more work. You will need to add
one line to the .bashrc file in your home directory. The .bashrc file is used by your shell
when you login. Make sure you are in your /home/login directory and copy the .bashrc
file, keeping it in the same directory, but with a name like .bashrc2.
cp .bashrc .bashrc2
If you make a mistake or have trouble, you can replace your .bashrc file by typing:
cp .bashrc2 .bashrc
Open the .bashrc file with your favorite text editor. For example, you could type pico
.bashrc at the command line to open the file. You should see something like this:
# .bashrc
You should then be able to install the RPM file without further errors. For more information
about using RPM and Gnome-RPM, refer to the Official Red Hat Linux Customization Guide
on the Red Hat Linux Documentation CD or online at http://www.redhat.com/docs/.
cd setiathome
Chapter 14. Frequently Asked Questions 139
To start the application now, precede the executable with a ./ as shown below:
./setiathome
The reason you need to use the ./ in order to start the application is because the executable
wasn’t placed in a directory where your user shell environment knew it could be found (such
as /usr/bin).
In such instances, you have to change into the directory which holds the executable and start
the application from there. That means you will have to tell your shell where it can find the
executable; adding ./ tells your user shell that the executable can be found in the current
working directory.
You can customize your settings so that you won’t be required to use the ./ each time. To
do this, you will have to edit your PATH variables.
Caution
These instructions are intended only for user accounts. Avoid modifying files such as the root user’s
.bash_profile, because of the potential security risks.
Start a text editor, such as pico, at a shell prompt. You can open the file called .bash_profile
by typing the following:
pico .bash_profile
You will see a PATH statement, similar to the one shown below.
PATH=$PATH:$HOME/bin:
PATH=$PATH:$HOME/bin:/usr/lib/:/home/user/directory/
Replace user with your user name and directory with the directory containing the exe-
cutable you wish to run.
Now, type [Ctrl]-[x]; you will be asked whether you want to save "the modified buffer"
(that’s what Pico calls an updated file); type [y] for "yes." Next, you will see the name the file
will be saved as; press the [Enter] key.
You can then make the changes to .bash_profile take effect immediately by typing the
following command:
source .bash_profile
By doing the above, you do not have to manually add ./ to the beginning of the executable
to start an application located in the directory you’ve added to your PATH.
140 Chapter 14. Frequently Asked Questions
mkdir /mnt/windows
Before you can access the partition, you will need to mount it at the directory you just cre-
ated. As root, type the following command at a shell prompt:
mkdir /mnt/windows
Next, while you’re still root, open the /etc/fstab in a text editor by typing (for example):
pico /etc/fstab
The line that probably shows where Windows is mounted is /dev/hda1 (or similar). Edit
this line so it looks like this:
Press [Ctrl]-[x] and then press [y] for yes when prompted to save the changes. For more
information on the mount command, refer the man page by typing man mount at a shell
prompt.
To access the partition, type cd /mnt/windows. To navigate through Windows 98’s "long file-
name" directories, surround the directory in quotation marks, as in ls "Program Files".
move forward a screen, press the [Space] bar; to move back a screen, press the [b] key, and
to quit, press [q].
Paging through .bash_history to find a command can be tedious. Alternatively, you can
search through the file for keywords using grep, a powerful search utility.
Say you were reading the man page the day before, but cannot recall its name. To search for
the command, type:
You will see a list of all the commands you typed which have the word man in them.
There are plenty of ways to your command history. For other tips and tricks, see Section 14.8.
To move forward a screen, press [Space] bar; to move back a screen, press the [b] key; to quit,
press [q].
You can achieve the same results with more, another paging utility.
• "Bang, bang": Typing !! (called "bang bang") executes the last command in the history.
142 Chapter 14. Frequently Asked Questions
• "Bang number": Typing !number (as in !302) will execute the command which is num-
bered 302 in the history file.
• "Bang string": Typing !string (as in !rpm) will execute a command with the most recent
matching string from the history file.
• [Up arrow] and[ down arrow]: At the shell or GUI terminal prompt, you can simply press
the up arrow to move back through previous commands in your history list (the down
arrow will move you forward through the commands) until you find the command you
want. Press [Enter] to execute the command, just as if you had typed it on the command
line.
3. You can now add single to the end of the text to tell GRUB to boot into single-user
Linux mode. Press [Enter] to make the editing change take effect.
4. You will be brought back to the edit mode screen. From here, press [b] and GRUB will
boot single-user Linux mode. After it finishes loading, you will be presented with a
shell prompt similar to the following:
sh-2.05#
su
Password: yourrootpassword
Now, type pico /etc/inittab to edit the file with Pico. The file /etc/inittab will open.
Within the first screen, you will see a section of the file which looks like this:
To change from a console to a graphical login, you should change the number in the line
id:3:initdefault: from a 3 to a 5.
Warning
Change only the number of the default runlevel from 3 to 5.
id:5:initdefault:
When you are satisfied with your change, save and exit the file using the [Ctrl]-[x] keys. You
will see a message telling you that the file has been modified, and asking you to confirm
your change. Type [Y] for yes.
Now, your next login will be from the graphical screen.
144 Chapter 14. Frequently Asked Questions
14.12. Configuring X
Everything on my desktop looks tiny. How do I change my screen resolution?
After you have installed Red Hat Linux, you may want to change your screen resolution, so
that objects will fit better on your desktop. You can adjust the resolution with Xconfigurator,
a tool which allows you to modify your X Window System settings.
To use Xconfigurator, you must log in as root and at a shell prompt, type Xconfigurator to
start the application. The opening screen will look like Figure 14-1.
Tip
You can start Xconfigurator in two other ways, both of which give you access to additional configu-
ration tools.
From the menu in GNOME or KDE, go to System => Text mode tool menu; or, from a shell prompt,
type setup. Both methods will produce a menu of items which you can configure, such as X, your
sound card, mouse, and other features.
To navigate and make selections, use the [Tab] key. When your selection is highlighted, press
the [Enter] key.
Note
Make certain that your monitor and graphics card are supported for Red Hat Linux. To check, visit
the Hardware Compatibility List at http://hardware.redhat.com.
To continue, [Tab] until the Ok button is highlighted and press [Enter]. Xconfigurator will
then probe your system for your video card, and suggest the correct X server to match your
system, as in Figure 14-2. Click the Ok button to proceed.
Chapter 14. Frequently Asked Questions 145
Next, pick your exact monitor make and model number, as in Figure 14-3. You can often find
the make and model number on the front or back of your monitor.
You will have quite a few monitor choices — the hash mark (#) indicates your position in
the list. Use your [Up Arrow] and [Down Arrow] keys to move through the list, or use the
[Home], [End], [Page Up] and [Page Down] keys. You can also jump to the manufacturer’s
place on the list by typing in the first letters of the name (such as ViewSonic) on your key-
board.
Tip
If you do not find your monitor among the listed makes and models, you can specify your monitor’s
horizontal and vertical sync frequencies by choosing Custom in the list. Refer to your monitor’s
documentation for information about its correct frequency rates. Be careful! Do not select a frequency
range which exceeds your monitor’s capacity, because you could damage or destroy it.
Once you have selected your monitor’s make and model, a dialog window appears to in-
form you that your card has be probed for its correct display settings. Do not worry if your
monitor blinks during the process; that is normal.
You do not have to probe your video card. If you choose No when asked if you want to
accept the settings on the Monitor Probe screen, the next dialog will ask you how much
memory is on your video card, then you will be able to select your chosen resolution (see
Figure 14-4).
146 Chapter 14. Frequently Asked Questions
You can choose modes ranging from 8-bit to 32-bit, depending on the power of your com-
puter and how many colors you want displayed. In each of the mode columns, you will find
resolution choices listed; using your [Tab] key, position the cursor in the boxes next to your
chosen resolution. Select one by pressing [Space].
Tip
You can select more than one screen resolution — for example, if you prefer 800x600 and 1024x768,
you can adjust your resolution at any time without opening Xconfigurator. To do this, use the [Ctrl]-
[Alt]-[+ (plus)] or [Ctrl]-[Alt]-[- (minus)] keys to switch between resolutions.
Category Application
Word Processors AbiWord, KWord
Spreadsheets Gnumeric, Kspread
Presentations Kpresenter
Charts and Diagrams Dia, Kcharts, Kivio
Graphic Design The GIMP, KDE Icon Editor, XFig
Image Viewers Electric Eyes, GQview, The GIMP, KView
Scanners The GIMP, XSane, Fax Viewer
PDAs Jpilot, gnome-pilot, Evolution, Kpilot
Digital Cameras gPhoto, XSane, Kamera
CD Recording Cdecord, Gnome Toaster, X-CD-Roast
Text Editors Emacs, vi, pico, joe, gedit, Kate, KDE
Advanced Editor, KDE Text Editor,
GNOME Text File Viewer
Email Clients Mozilla Mail, Evolution, Kmail, Netscape
Mail, Balsa, pine, mutt, emacs
Web Browsers Mozilla, Netscape, Galeon, Nautilus,
Konquerer, Lynx
Chat GAIM, X-Chat IRC Client
PDF Viewers xpdf, Ghostview, GNOME Ghostview, KDE
Ghostview
Personal Finance Gnucash
Fax K Send a Fax
Multimedia GNOME CD Player, GNOME Sound
Recorder, Cpd, KDE CD Player, XMMS,
AUmix, Audio Mixer, Midi/Karaoke
Player, KDE Sound Mixer, KDE MidiSynth
148 Appendix A. Applications
Appendix B.
A Comparison of Common DOS and Linux
Commands
Many Linux commands typed at a shell prompt are similar to the commands you would
type in MS-DOS. In fact, some commands are identical.
This appendix provides common commands used at the MS-DOS prompt in Windows(tm)
and their counterparts in Linux. Basic examples of how the command are used at the Linux
shell prompt are also provided. Note that these commands usually have a number of op-
tions. To learn more about each command, read its associated man page (for example, type
man ls at the shell prompt to read about the ls command).
• /bin - Used to store user commands. The directory /usr/bin also stores user commands.
• /sbin - Location of many system commands, such as shutdown. The directory /usr/bin
also contains many system commands.
• /root - The home directory of the superuser.
• /mnt - This directory typically contains the mount points for filesystems mounted after
the system is booted.
• /boot - Contains the kernel and other files used during system startup.
• /lost+found - Used by fsck to place orphaned files (files without names).
• /lib - Contains many library files used by programs in /bin and /sbin. The directory
/usr/bin contains more library files.
• /dev - Stores device files.
• /etc - Contains many configuration files and directories.
• /var - For "variable" files, such as log files and the printer spool.
• /usr - Contains files and directories directly relating to users of the system.
• /proc - A virtual file system (not actually stored on the disk) that contains system infor-
mation used by certain programs.
• /tmp - A "scratch pad" for users and programs. /tmp has global read/write access.
• /home - Typical location of user home directories.
152 Appendix C. System Directories
Appendix D.
Keyboard Shortcuts
Here are a few keyboard shortcuts you can use to perform common tasks quickly. Many
more are available in addition to what is listed here. For more command line and keyboard
shortcuts, visit:
http://sunsite.dk/linux-newbie/Linux_commands.htm#shortcuts
• [Ctrl] + [Alt] + [Backspace] = kill X. Kills your current X session and returns you to the
login screen. Use this if the normal exit procedure does not work.
• [Ctrl] + [Alt] + [Delete] = shutdown and reboot. Shuts down your current session and
reboots the OS. Use only when the normal shutdown procedure does not work.
• [Ctrl] + [Alt] + [Fn] = switches screens. [Ctrl]+[Alt] + one of the function keys displays a
new screen. [F1] through [F6] are text (console) screens and [F7] is a graphical screen.
• [Ctrl] + [Tab] = switch tasks. If you have more than one application open at a time, you
can use [Alt] + [Tab] to switch among open tasks and applications.
• [Ctrl] + [a] = move cursor to the beginning of a line. This works in most text editors and
in the URL field in Mozilla.
• [Ctrl] + [d] = logout of a terminal or console instead of having to type exit or logout.
• [Ctrl] + [e] = move cursor to end of a line. This works in most text editors and in the URL
field in Mozilla.
• [Ctrl] + [l] = clear the terminal. This shortcut does the same thing as typing "clear" at a
command line.
• [Ctrl] + [u] = clear the current line. If you are working in a terminal, use this shortcut to
clear the current line from the cursor all the way to the end of the line.
• [Middle Mouse Button] = pastes highlighted material. Use the left mouse button to high-
light material. Point the cursor to the spot where you want it pasted. Click the middle
mouse button to paste it.
• [Tab] = command autocomplete. Use this command when working in a terminal. Type
the first few characters of a command and then press the [Tab] key. It will automatically
complete the command or show all the commands that match the characters you typed.
• [Up/Down Arrow] = show command history. When working in a terminal, press the [up]
or [down] arrow to scroll through a history of commands you have typed from the current
directory. When you see the command you want to use, press [Enter].
• clear = clear the terminal. Type this at a command line to clear all displayed data from
the terminal window.
• exit = logout. Type this at a command line to logout of the current user or root account.
• history = show history of commands. Type this at a command line to see a numbered
list of the previous 500 commands you typed. To display a shorter list of commands, by
type history followed by a space and a number, for example, history 20.
• reset = refresh terminal screen. Type this at a command line to refresh the terminal screen
if characters are unclear.
154 Appendix D. Keyboard Shortcuts
Index clear, 110
command history, 116
tips, 141
Symbols
commands
/etc/printcap, 79 (See shell prompt)
/etc/printcap.local, 79
666 cat, 114
permissions, 124 cat, using, 110
777 cd, 104
permissions, 124
change directories, 104
chmod, 118
A numerical settings, 123
appending standard output, 112 clear, 110
applets cron, 109
adding to GNOME’s panel, 30
adding to KDE panel, 40 DOS, 149
in GNOME, 29 finding, 140
panel grep, 114
in KDE, 38
applications head, 114
cross-reference list of some Linux applications, history, 140
147 locate, 108
starting from shell prompt, 138
archiving files, 127 ls, 107
keeping output from scrolling, 141
ls -a, 107
B
ls -al, 107
bunzip2, 128 ls, common options with, 108
burning CDs, 50
additional resources, 55 multiple, 118
with cdrecord, 53 print working directory (pwd), 104
with mkisofs, 53 pwd, 104
with X-CD-Roast, 50
bzip2, 128 reset, 110
rm
(See files, deleting)
C
rm -r
cat, 110 (See directories, deleting)
cd, 104
CD-rewritable (CD-RW), 50 stringing together, 118
additional resources, 55 su, 106
and cdrecord, 53 tail, 114
and mkisofs, 53
CD-writable (CD-R), 50 common user questions, 137
additional resources, 55 compressing files, 127
and cdrecord, 53 conventions
and mkisofs, 53
document, x
and X-CD-Roast, 50
cdrecord, 54 copying and pasting text
CDs, playing, 87, 87 when using X, xiii
chmod, 118
numerical settings, 123
156
D F
desktop FAQ, 137
KDE, 36
switch between GNOME and KDE, 19 accessing a Windows partition, 140
desktops finding previous used commands, 140
multiple
history tips and tricks, 141
KDE, 38
DHCP, 57 keeping ls output from scrolling, 141
directories login problems, 142
changing, 104
copying, 131 permissions for installing RPMs, 138
deleting, 133 starting applications, 138
descriptions, 151 feedback
listing contents, 107
managing contact information for this manual, xiii
from shell prompt, 103 FHS
moving, 132
(See Filesystem Hierarchy Standard)
diskettes, 45
formatting, 47 file, 127
KDE Floppy Formatter, 48 file manager
mke2fs, 48
for GNOME, 30
mounting, 45
MS-DOS formatted, 46 for KDE, 40
unmounting, 45 file managers, 125
using, 45
DNS file system
definition, 57 understanding, 125
dot files
files
(See hidden files)
drag and drop, xiii archived, 126
archiving, 127
compressed, 126
E
compressing, 127
Electric Eyes, 97
email clients, 69 copying, 131
Evolution, 70 copying at a shell prompt, 131
KMail, 72
deleting, 133
Mozilla Mail, 73
Newsgroups, 75 deleting at a shell prompt, 131
mutt, 75 formats, 126
pine, 75
plain text, 75 managing
mutt, 75 from shell prompt, 103
pine, 75 moving, 132
environment variables
PATH, 139 moving at a shell prompt, 131
errata renaming at a shell prompt, 131
updating with, 136
types of, 126
Evolution
(See email clients) Filesystem Hierarchy Standard, 126
ext2 file system formatting diskettes, 47
and floppy disks, 47
157
G K
games and amusements, 89, 89 KDE, 35
finding more online, 91 applets
GIMP, 98 adding, 40
opening a file, 99 multiple desktops, 38
saving a file, 99 customizing, 42
GNOME, 27 desktop, 36
applets, 29, 30 desktop icons, 37
customizing, 32 desktops
desktop, 27 multiple, 38
latest documentation, 27 switching, 39
logging out of, 33 Konqueror
main menu, 29 navigation panel, 41
panel, 28 latest documentation, 35
using KDE applications, 27 main menu, 38
website location, 27 panel, 37
workspace, 27 applets, 38
GNOME Desktop, 18 switching tasks, 40
GQview, 95 Taskbar, 39
graphical login using GNOME applications, 27
changing to, 143 website location, 35
graphics, 98 KDE Desktop, 18
gunzip, 128 keyboard shortcuts, 153
gzip, 128 KFloppy, 48
KMail
(See email clients)
H Konqueror
(See Web browsers)
help KDE file manager, 40
with GNOME navigation panel, 41
finding, 27 viewing images with, 94
with KDE
finding, 36
hidden files, 107 L
history
finding commands using, 140 less, 113
linux commands
(See shell prompt)
listing directories
I
(See commands, ls)
images logging in, 16
additional resources, 101 graphical, 143
manipulation, 93 graphical login, 18
GIMP, 98 virtual console login, 17
viewing, 93, 93 logging out, 23
Electric Eyes, 97 from GNOME, 33
GQview, 95 KDE, 43
Konqueror, 94 saving current settings, 43
Nautilus, 93 login problems
Internet using single-user mode, 142
configuring, 57 lpd, 80
Internet Druid, 57 ls, 107
introduction, ix printing output, 141
IP address, 57 viewing output, 141
158
M PDF
main menu viewing, 134
in GNOME, 29 xpdf, 134
in KDE, 38
mke2fs, 48 permissions
mkisofs, 53 numerical settings, 123
mouse
setting for new RPMs, 138
how to use, xiii
Mozilla permissions and ownership, 118
(See Web browsers) pine
Mozilla Mail
(See email clients) (See email clients)
mtools, 46 pipes, 113
mutt
Point-to-Point Protocol, 57
(See email clients)
PPP, 57
printconf
N
(See printer configuration)
Nautilus
printer configuration, 79
(See Web browsers)
disabling text icons, 31 creating an alias, 84
disabling thumbnails, 31 default printer, 83
GNOME file manager, 30
viewing images with, 93 delete existing printer, 83
Newsgroups driver options, 85
(See email clients)
Assume Unknown Data is Text, 85
Convert Text to Postscript, 85
O Effective Filter Locale, 85
online Page Size, 85
connecting with Internet Druid, 57
Prerender Postscript, 85
ownership and permissions, 118
Send End-of-Transmission (EOT), 85
Send Form-Feed (FF), 85
P
edit driver, 85
pagers, 113
less, 113 edit existing printer, ??
panel local printer, 81
configuring the, 30, 40
modifying existing printers, 84
in GNOME, 28
KDE, 37 overriding a printer, 83
adding an application, 38 rename existing printer, 84
customizing, 38
hiding, 38 test page, 83
partitions text-based application, 79
accessing Windows, 140
printing
password
forgotten, 142 from command line, 109
passwords printtool
creating secure, 21
PATH, 139 (See printer configuration)
editing, 138 pwd, 104
pathnames
relative and absolute, 104
R switching tasks
KDE, 40
Red Hat Network, 135
system directories
Red Hat Network Registration Client, 135
descriptions, 151
Red Hat Update Agent, 135
redirecting standard input, 113
redirection, 110 T
reset, 110
resolution tab completion, 116
changing, 144 Taskbar
RHN KDE, 39
(See Red Hat Network) terminal
root, 125 launchers in GNOME and KDE, 19
and root login, 125 terms
logging in as, 16 introductory, 15
RPM, 136 toubleshooting
installing packages, 135 sound card, 88
upgrading packages, 135 video card, 89
RPMs Trash icon
error message while installing, 138 KDE, 37
installing with Gnome-RPM, 138
U
S unzip, 128
shell, 103 user account
history of, 103 creating, 19
shell prompt, 19 importance of creating, 16
basic commands, 103 utilities
chmod, 120 cat, 110
less, 113
single-user mode, 142
sndconfig, 88
software
installing, 135
W
upgrading, 135 Web browsers, 59
sound card Konqueror, 63
configuring, 88 Mozilla, 59
standard input Nautilus, 62
redirecting, 113 Windows
standard output accessing on a separate partition
appending, 112 add line to /etc/fstab, 140
redirecting, 110
Start Here, 31
startup messages X
dmesg | more, 114
Xconfigurator, 89
startx, 18
xpdf, 134
su, 106
superuser
(See commands, su)
switching desktops
Z
KDE, 39 zip, 128