Home > Store

Practical Guide to Red Hat® Linux® 8, A

Register your product to gain access to bonus material or receive a coupon.

Practical Guide to Red Hat® Linux® 8, A

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • The Web site (www.sobell.com) includes downloadable examples from the book.
  • Contains a free version of the latest release of Red Hat Linux.

Description

  • Copyright 2003
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-70313-0
  • ISBN-13: 978-0-201-70313-9

A Practical Guide to Red Hat® Linux® 8 provides everyone--new users to experienced programmers--with the knowledge and skills they need to master Linux. Written by best-selling author Mark Sobell, this book is a clear, thorough, and logically organized tutorial and reference.

Part I is a comprehensive tutorial that introduces the basics of GNU/Linux. It explains how to use the basic utilities, the filesystem, and many features of the shell command interpreter. Illustrations and step-by-step examples demonstrate how each command works. Part II covers more advanced topics, such as graphical user interfaces (GUIs), networking, text editors, programming tools, system administration, the new features of Red Hat Linux version 8, and the three major shells, including shell scripts. Part III is a detailed reference to more than 85 GNU/Linux utilities.

This authoritative guide includes:

  • Instructions for users and administrators covering security and RH features, including Red Hat Network (RHN), Red Hat system administration tools, and Red Hat Package Manager (RPM).
  • A full chapter on the use and customization of the Red Hat default GNOME 2 desktop manager and the new Metacity window manager
  • A full chapter on how to use and customize the KDE 3 desktop environment
  • Lucid descriptions of utilities illustrated by many
  • practical examples
  • Detailed coverage of the Linux programming environment and tools, including the C compiler, make, and source code management
  • In-depth discussion of networking and the Internet, including types of networks, secure network utilities, and distributed computing
  • An emphasis on security issues throughout, including highlighted warnings and a dedicated appendix
  • Extensive information and full-length examples about using shells interactively and as programming tools, with chapters on the Bourne Again Shell (bash), the TC Shell (tcsh), and the Z Shell (zsh)
  • Appendixes covering regular expressions, online resources, security, and POSIX standards
  • A comprehensive glossary of more than five hundred words and phrases

Helpful features such as tips, cautions, and security alerts supplement the lessons of the text. The companion Web site (http://www.sobell.com) provides useful links, downloadable examples and illustrations, answers to selected review exercises, additional exercises and programs, and updates to the book.

The accompanying CD-ROMs contain Red Hat Linux version 8.0.



0201703130B11262002

Extras

Author's Site

Click below for Web Resources related to this title:
Author Web Site

Sample Content

Online Sample Chapter

Red Hat Linux: Networking and the Internet

Downloadable Sample Chapter

Click below for Sample Chapter(s) related to this title:
Sample Chapter 5

Sample Chapter 9

Table of Contents

(Each chapter concludes with a Chapter Summary and Review Exercises.)

Preface.

I. GNU/Linux Basics.

1. GNU/Linux: A Product of the Internet.

The GNU/Linux Connection.

The Code Is Free.

Have Fun!

The Heritage of GNU/Linux: UNIX.

What Is So Good about GNU/Linux?

Why GNU/Linux Is Popular with Hardware Companies and Developers.

GNU/Linux Is Portable.

Standards.

The C Programming Language.

Overview of GNU/Linux.

Linux Has a Kernel Programming Interface.

GNU/Linux Can Support Many Users.

GNU/Linux Can Run Many Tasks.

GNU/Linux Provides a Secure Hierarchical Filesystem.

The Shell: Command Interpreter and Programming Language.

A Large Collection of Useful Utilities.

Interprocess Communication.

System Administration.

Additional Features of GNU/Linux.

GUI: Graphical User Interfaces.

(Inter)networking Utilities.

Software Development.

Text-Based Editors.

GUI Editors.

Electronic Mail.

2. Getting Started.

Before You Start.

Conventions.

Graphical versus Character-Based Interface.

Red Hat Linux.

Logging In.

Incorrect Login.

The Shell.

Terminal Emulation and telnet.

Logging Out.

Superuser.

Virtual Console.

Correcting a Mistake.

Repeating/Editing Command Lines.

passwd: Changes Your Password.

Documentation.

man and xman: Display the System Manual.

info: Displays Information.

HOWTOs.

Other Sources of Help.

Tutorial: Using pico to Create/Edit a File.

Starting pico.

Entering Text.

Getting Help.

Correcting Text.

Ending the Session.

Basic Utilities.

ls: Lists the Names of Files.

cat: Displays a Text File.

less Is more: Displaying a Text File One Screen at a Time.

rm: Deletes a File.

hostname: Displays Your Machine Name.

Special Characters.

3. Introduction to the GNU/Linux Utilities.

Working with Files.

cp: Copies a File.

mv: Changes the Name of a File.

lpr: Prints a File.

grep: Finds a String.

head: Displays the Beginning of a File.

tail: Displays the End of a File.

sort: Displays a File in Order.

uniq: Removes Duplicate Lines from a File.

diff: Compares Two Files.

file: Tests the Contents of a File.

| (Pipe): Communicates between Processes.

Four More Utilities.

echo: Displays Text.

date: Displays the Time and Date.

script: Records a GNU/Linux Session.

mcopy: Converts GNU/Linux Files to MS Windows Format.

Compressing and Archiving a File.

gzip: Compresses a File.

gunzip and zcat: Decompress a File.

bzip2: Compresses/Decompresses a File.

tar: Packs and Unpacks Files.

Locating Commands.

which, whereis: Locate a Utility.

apropos: Searches for a Keyword.

Obtaining User and System Information.

who: Lists Users on the System.

finger: Lists Users on the System.

w: Lists Users on the System.

Communicating with Other Users.

write: Sends a Message.

talk: Communicates with Another User.

mesg: Denies or Accepts Messages.

E-Mail.

Tutorial: Using pine to Send and Receive E-Mail.

Chapter Summary.

Exercises.

Advanced Exercises.

4. The GNU/Linux Filesystem.

The Hierarchical Filesystem.

Directory and Ordinary Files.

Filenames.

mkdir: Creates a Directory.

The Working Directory.

Home Directory.

Absolute Pathnames.

Relative Pathnames.

Important Standard Directories and Files.

Working with Directories.

rmdir: Deletes a Directory.

Pathnames.

mv, cp: Moves or Copies a File.

mv: Moves a Directory.

Access Permissions.

ls -l: Displays Permissions.

chmod: Changes Access Permissions.

Setuid and Setgid Permissions.

Directory Access Permissions.

Links.

Hard Links.

Symbolic Links.

rm: Removes a Link.

5. The Shell I.

The Command Line.

Syntax.

Processing the Command Line.

Executing the Command Line.

Standard Input and Standard Output.

The Screen as a File.

The Screen/Keyboard as Standard Input and Standard Output.

Redirection.

Redirecting Standard Output.

Redirecting Standard Input.

Appending Standard Output to a File.

/dev/null: Data Sink.

Pipes.

Filters.

tee: Sends Output in Two Directions.

Running a Program in the Background.

Filename Generation/Pathname Expansion.

The ? Special Character.

The * Special Character.

The [] Special Characters.

Builtins.

II. Intermediate/Advanced GNU/Linux.

6. X Window System and Graphical User Interface.

X and GUI: Desktop, Window, and Mouse.

X Window System.

Changing to a Different Desktop Manager.

Desktop.

Terminal Emulator/Shell.

File Manager.

Panel.

Windows.

Shading a Window.

Session Manager.

X Window System.

Customizing X Applications from the Command Line.

Setting X Resources.

Remote Computing and Local Displays.

Stopping the X Server.

Remapping Mouse Buttons.

X Applications.

7. GNOME Desktop Manager.

Choosing Your Window Manager.

Getting Started.

Help.

Windows and Mouse Clicks.

GNOME Menu.

Main Panel.

Desktop.

Menus.

Nautilus: File Manager.

Display.

Control Bars.

Properties.

GNOME Utilities.

Search Tool.

Font Preferences.

Pick a Font Window.

Pick a Color Window.

Run Program Window.

File Types and Programs (MIME Types).

GNOME Terminal Emulator/Shell.

Customizing GNOME.

Start Here: Preferences/Control Center.

Nautilus Menubar: EditaPreferences.

Panels.

Menus.

The Sawfish Window Manager.

Bringing Up Sawfish.

Working with Sawfish.

Customizing Sawfish: The Sawfish Configurator.

8. KDE Desktop Environment.

Getting Started.

Help.

Windows and Mouse Clicks.

K Menu (Application Starter).

Other Menus.

kicker: Main Panel.

KDE Utilities.

konsole: Terminal Emulator.

kcolorchooser: Selects a Color.

Run Command.

Cut and Paste.

Konqueror Browser/File Manager.

Getting Started.

File Manager.

Web Browser.

Bookmarks.

Kparts.

Toolbars.

kfind: Finds Files.

Views II.

Shortcuts.

Tutorial: Active, Linked, and Locked Views.

Navigation Panel.

Menus.

Desktop Menus.

Taskbar.

Toolbar Menu.

Window List Menu.

(Window) Operations Menu.

Customizing KDE.

Control Center.

Panels.

Toolbars.

Miscellaneous.

9. Networking and the Internet.

Types of Networks and How They Work.

Broadcast.

Point-to-Point.

Switched.

LAN: Local Area Network.

WAN: Wide Area Network.

Internetworking through Gateways and Routers.

Network Protocols.

Host Address.

CIDR: Classless Inter-Domain Routing.

Hostnames.

Communicate over a Network.

finger: Displays Information about Remote Users.

Sending Mail to a Remote User.

Mailing List Servers.

Network Utilities.

Trusted Hosts.

ssh: Logs in or Runs a Command on a Remote Computer.

scp: Copies a file from/to a Remote Computer.

telnet: Logs in on a Remote Computer.

ftp: Transfers Files over a Network.

ping: Tests a Network Connection.

traceroute: Traces a Route over the Internet.

host and dig: Queries Internet Name Servers.

whois: Looks Up Information about an Internet Site.

Distributed Computing.

The Client/Server Model.

DNS: Domain Name Service.

NIS: Network Information Service.

NFS: Network Filesystem.

automount: Mounts Filesystems Automatically.

Internet Services.

Proxy Server.

RPC Network Services.

Usenet.

Tutorial: Using pine as a Newsreader.

Subscribing to Newsgroups.

Reading News.

Posting News.

Unsubscribing from a Newsgroup.

Netnews with Mozilla.

WWW: World Wide Web.

URL: Uniform Resource Locator.

Browsers.

Search Engine.

Downloading a File.

10. The vim Editor.

History.

Tutorial: Creating and Editing a File with vim.

Specifying a Terminal.

Starting vim.

Command and Input Modes.

Entering Text.

Getting Help.

Ending the Editing Session.

Introduction to vim Features.

Online Help.

Modes of Operation.

The Display.

Correcting Text as You Insert It.

Work Buffer.

Line Length and File Size.

Windows.

File Locks.

Abnormal Termination of an Editing Session.

Recovering Text after a Crash.

Command Mode: Moving the Cursor.

Moving the Cursor by Characters.

Moving the Cursor to a Specific Character.

Moving the Cursor by Words.

Moving the Cursor by Lines.

Moving the Cursor by Sentences and Paragraphs.

Moving the Cursor within the Screen.

Viewing Different Parts of the Work Buffer.

Input Mode.

Inserting Text.

Appending Text.

Opening a Line for Text.

Replacing Text.

Quoting Special Characters.

Command Mode: Deleting and Changing Text.

Undoing Changes.

Deleting Characters.

Deleting Text.

Changing Text.

Replacing Text.

Changing Case.

Searching and Substituting.

Searching for a Character.

Searching for a String.

Substituting One String for Another.

Miscellaneous Commands.

Yank, Put, and Delete Commands.

The General-Purpose Buffer.

Named Buffers.

Numbered Buffers.

Reading and Writing Files.

Reading Files.

Writing Files.

Identifying the Current File.

Setting Parameters.

Setting Parameters from within vim.

Setting Parameters in a Startup File.

The .vimrc Startup File.

Parameters.

Advanced Editing Techniques.

Using Markers.

Editing Other Files.

Macros and Shortcuts.

Executing Shell Commands from within vim.

Units of Measure.

Character.

Word.

Blank-Delimited Word.

Line.

Sentence.

Paragraph.

Screen.

Repeat Factor.

11. The emacs Editor.

History.

Evolution.

emacs versus vi.

Tutorial: Getting Started with emacs.

Starting emacs.

Stopping emacs.

Inserting Text.

Deleting Characters.

Moving the Cursor.

Editing at the Cursor Position.

Saving and Retrieving the Buffer.

Basic Editing Commands.

Keys: Notation and Use.

Key Sequences and Commands.

META-x: Running a Command without a Key Binding.

Numeric Arguments.

Point and the Cursor.

Scrolling through a Buffer.

Erasing Text.

Searching.

Online Help.

Advanced Editing Topics.

Undoing Changes.

Mark and Region.

Cut and Paste: Yanking Killed Text.

Inserting Special Characters.

Global Buffer Commands.

Files.

Buffers.

Windows.

Foreground Shell Commands.

Background Shell Commands.

Language-Sensitive Editing.

Selecting a Major Mode.

Human-Language Modes.

C Mode.

Customizing Indention.

Comments.

Special-Purpose Modes.

Customizing emacs.

The .emacs Startup File.

Remapping Keys.

A Sample .emacs File.

emacs and the X Window System.

Mouse Commands for Cut and Paste.

Mouse-2 Selections.

Scrollbars.

Manipulating Windows with the Mouse.

Frame Management.

Menubars.

Resources for emacs.

The emacs Web Ring.

Usenet emacs FAQ (Frequently Asked Questions).

Access to emacs.

12. The Shell II: The Bourne Again Shell.

Background.

Shell Basics.

Assignment Statements.

Writing a Simple Shell Script.

Separating and Grouping Commands.

; and NEWLINE Separate Commands.

\ Continues a Command.

| and & Separate Commands and Do Something Else.

Multitasking Demonstration.

() Groups Commands.

Redirecting Standard Error.

noclobber: Avoids Overwriting Files.

Job Control.

jobs: Lists Jobs.

fg: Brings a Job to the Foreground.

bg: Sends a Job to the Background.

Manipulating the Directory Stack.

dirs: Displays the Stack.

pushd: Pushes a Directory on the Stack.

popd: Pops a Directory off the Stack.

Processes.

Process Structure.

Process Identification.

Executing a Command.

Running a Shell Script.

Parameters and Variables.

User-Created Variables.

Keyword Variables.

Positional Parameters.

Special Parameters.

History.

Editing the Command Line.

fc: Displays, Edits, and Reexecutes Commands.

Reexecuting an Event with the C Shell History Mechanism.

The Readline Library.

Alias.

Quotation Marks: Single versus Double.

Examples.

Command Line Expansion.

Order of Expansion.

{} Brace Expansion.

~ Tilde Expansion.

<36>n Parameter Expansion.

<36>VARIABLE Variable Expansion.

<36>(…) Command Substitution.

Arithmetic Expansion.

Word Splitting.

Pathname Expansion.

13. Programming the Bourne Again Shell.

Control Structures.

if…then.

if…then…else.

if…then…elif.

for…in.

for.

while.

until.

break and continue.

case.

select.

Here Document.

Expanding Null or Unset Variables.

:- Uses a Default Value.

:= Assigns a Default Value.

:? Displays an Error Message.

String Pattern Matching.

Filename Generation.

Builtins.

exec: Executes a Command.

trap: Catches a Signal.

A Partial List of Builtins.

Functions.

14. The TC Shell.

Shell Scripts.

Entering and Leaving the TC Shell.

Startup Files.

Features Common to the Bourne Again and TC Shells.

History.

Alias.

Job Control.

Filename Substitution.

Manipulating the Directory Stack.

Command Substitution.

Redirecting Standard Error.

Command Line Expansion.

Word Completion.

Editing the Command Line.

Correcting Spelling.

Before You Press RETURN.

After You Press RETURN.

Variables.

Variable Substitution.

String Variables.

Arrays of String Variables.

Numeric Variables.

Braces.

Special Variable Forms.

Shell Variables.

Control Structures.

if.

goto.

Interrupt Handling.

if…then…else.

foreach.

while.

break and continue.

switch.

Builtins.

15. The Z Shell and Advanced Shell Programming.

The Z Shell, Korn Shell, and Pd-ksh.

Z Shell Basics.

Running Scripts.

Startup Files.

Commands That Are Symbols.

Variables.

Variable Attributes.

Locality of Variables.

Keyword Variables.

Controlling the Prompt.

Expanding Shell Variables.

Filename Generation.

Array Variables.

Arithmetic.

Builtins.

Control Structures.

Option Processing.

Input and Output.

File Descriptors.

Functions.

Builtin Commands.

Command Line Editing.

The vi Command Line Editor.

The emacs Command Line Editor.

History.

Processing a Command.

History Expansion.

Alias Substitution.

Parsing the Command Line.

Filename Expansion.

Filename Generation (Globbing).

I/O Redirection.

The Coprocess.

Spelling Correction.

Shell Programs.

Program Structures.

A Programming Problem: makercs.

Another Programming Problem: quiz.

Z Shell Options.

16. Programming Tools.

Programming in C.

Checking Your Compiler.

A C Programming Example.

Compiling and Linking a C Program.

Using Shared Libraries.

Fixing Broken Binaries.

Creating Shared Libraries.

make: Keeps a Set of Programs Current.

Implied Dependencies.

Macros.

Debugging C Programs.

gcc: Compiler Warning Options Find Errors in Programs.

Symbolic Debugger.

Threads.

System Calls.

strace: Traces System Calls.

Controlling Processes.

Accessing the Filesystem.

Source Code Management.

RCS: Revision Control System.

CVS: Concurrent Versions System.

17. Red Hat Linux System Administration.

System Administrator and Superuser.

System Administration Tools.

Avoiding a Trojan Horse.

Installing Red Hat Linux (Overview).

Finding the Installation Manual.

Downloading, Burning, and Installing a CD-ROM Set.

Types of Installations.

Hardware.

Classes of Installations.

Kickstart Configurator.

Preparing for Installation.

Partitioning a Disk.

mkbootdisk: Creates a Rescue/Emergency/Boot Floppy Disk.

Beginning Installation.

redhat-config-xfree86: Sets Up X.

Initializing Databases.

Setting Up the Default Desktop Manager.

redhat-config-securitylevel: Sets up a Firewall.

Installing and Removing Software.

redhat-config-packages: Adds and Removes Software Packages.

rpm: Red Hat Package Manager.

Installing Non-rpm Software.

GNU Configure and Build System.

Keeping Software Up-to-Date.

Bugs.

Errata: Security Alerts, Bugfixes, and Enhancements.

Red Hat Network.

System Operation.

Booting the System.

rc Scripts: Start and Stop System Services.

Emergency Mode.

Single-User Mode.

Going Multiuser.

Multiuser Mode.

Logging In.

Running a Program and Logging Out.

Bringing the System Down.

Crash.

File, Directory, and Filesystem.

Important Files and Directories.

File Types.

Filesystems.

GUI System Administration Tools.

GNOME System Settings Window/Menu.

KDE Control Center: System Module.

KDE Control Center: Network Module.

Configuring User and Group Accounts.

redhat-config-users: Manages User Accounts.

kuser: Manages User Accounts under KDE.

useradd: Adds a User Account.

userdel: Removes a User Account.

groupadd: Adds a Group.

Backing Up Files.

Choosing a Backup Medium.

Backup Utilities.

Performing a Simple Backup.

dump, restore: Back Up and Restore Filesystems.

Printing.

printconf-gui: Configures and Manages LPRng Printers.

CUPS.

Manually Adding a Local Printer.

/etc/printcap: Describes Printers.

KDEPrint: Manages Printers.

Configuring Network Services.

sys-unconfig: Reconfigures Network Services.

Proxies.

hosts: Stores a List of Machines.

NFS: Network Filesystem.

NIS: Network Information Service.

DNS: Domain Name Service.

Internet Configuration Wizard.

Samba/swat.

DHCP Client.

OpenSSH: Provides Secure Network Tools.

GnuPG: GNU Privacy Guard.

Rebuilding the Linux Kernel.

Preparing Source Code.

Read the Documentation.

Configuring and Compiling the Linux Kernel and Modules.

Compiling the Linux Kernel.

Using Loadable Kernel Modules.

Installing the Kernel and Associated Files.

Changing lilo.conf.

Rebooting.

Boot Loader.

PAM.

Configuration File, Module Type, and Control Flag.

Example.

Modifying the PAM Configuration.

Administration Utilities.

kudzu: Adds or Removes a Device.

sendmail: Sends and Receives Mail.

Other Utilities.

Administration Tasks.

Log Files and Mail for root.

Scheduling Tasks.

System Reports.

@BHEADS = Informing Users.

Creating Problems.

Solving Problems.

Getting Help.

III. The GNU/Linux Utility Programs.

sample Very brief description of what the utility does.

aspell Checks a file for spelling errors.

at Executes a shell script at a time you specify.

cal Displays a calendar.

cat Joins or displays files.

cd Changes to another working directory.

chgrp Changes the group associated with a file.

chmod Changes the access mode of a file.

chown Changes the owner of a file.

ci Creates or records changes in an RCS file.

cmp Checks whether two files differ.

co Retrieves an unencoded revision of an RCS file.

comm Compares sorted files.

configure Configures source code automatically.

cp Copies one or more files.

cpio Creates an archive or restores files from an archive.

crontab Maintains crontab files.

cut Selects characters or fields from input lines.

cvs Manages concurrent access to files in a hierarchy.

date Displays or sets the time and date.

dd Converts and copies a file.

df Displays disk space usage.

diff Displays the differences between two files.

du Displays information on disk usage.

echo Displays a message.

expr Evaluates an expression.

file Displays the classification of a file.

find Uses criteria to find files.

finger Displays information about users.

fmt Formats text very simply.

fsck Checks and repairs a filesystem.

ftp Transfers files over a network.

gawk Searches for and processes patterns in a file.

gcc Compiles C and C++ programs.

grep Searches for a pattern in files.

gzip Compresses or decompresses files.

head Displays the beginning of a file.

kill Terminates a process.

less Displays text files, one screen at a time.

ln Makes a link to a file.

lpr Prints files.

ls Displays information about one or more files.

mail Sends and receives electronic mail.

make Keeps a set of programs current.

man Displays documentation for commands.

mkdir Makes a directory.

Mtools Uses DOS-style commands on files and directories.

mv Moves (renames) a file.

nice Changes the priority of a command.

nohup Runs a command that keeps running after you log out.

od Dumps the contents of a file.

paste Joins corresponding lines from files.

patch Updates source code.

pine Sends and receives electronic mail and news.

pr Paginates files for printing.

ps Displays process status.

rcp Copies one or more files to or from a remote computer.

rcs Creates or changes the attributes of an RCS file.

rlog Prints a summary of the history of an RCS file.

rlogin Logs in on a remote computer.

rm Removes a file (deletes a link).

rmdir Removes a directory.

rsh Executes commands on a remote computer.

scp Securely copies one or more files to or from a remote computer.

sed Edits a file (not interactively).

ssh Securely executes commands on a remote computer.

sleep Creates a process that sleeps for a specified interval.

sort Sorts and/or merges files.

stty Displays or sets terminal parameters.

tail Displays the last part (tail) of a file.

tar Stores or retrieves files to/from an archive file.

tee Copies standard input to standard output and one or more files.

telnet Connects to a remote computer over a network.

test Evaluates an expression.

top Dynamically displays process status.

touch Updates a file's modification time.

tr Replaces specified characters.

tty Displays the terminal pathname.

umask Establishes the file-creation permissions mask.

uniq Displays lines of a file that are unique.

w Displays information on system users.

wc Displays the number of lines, words, and bytes in a file.

which Shows where in your path a command is located.

who Displays names of users.

xargs Converts standard output of one command into arguments for another.

IV. Appendixes.

Appendix A: Regular Expressions.

Characters.

Delimiters.

Simple Strings.

Special Characters.

Period.

Brackets.

Asterisk.

Caret and Dollar Sign.

Quoting Special Characters.

Rules.

Longest Match Possible.

Empty Regular Expressions.

Bracketing Expressions.

The Replacement String.

Ampersand.

Quoted Digit.

Extended Regular Expressions.

Appendix Summary.

Appendix B: Help.

Solving a Problem.

Finding GNU/Linux-Related Information.

Documentation.

Useful GNU/Linux Sites.

GNU/Linux Newsgroups.

Mailing Lists.

Words.

Programs.

Office Suites and Word Processors.

Specifying Your Terminal.

Appendix C: Security.

Encryption.

Public Key Encryption.

Symmetric Key Encryption.

Encryption Implementation.

GnuPG/PGP.

File Security.

E-mail Security.

MTAs (Mail Transfer Agents).

MUAs (Mail User Agents).

Network Security.

Network Security Solutions.

Network Security Guidelines.

Host Security.

Login Security.

Remote Access Security.

Viruses and Worms.

Physical Security.

Security Resources.

Appendix Summary.

Appendix D: The POSIX Standards.

Background.

POSIX.1.

POSIX.2.

Localization.

The POSIX Shell.

Utilities for Portable Shell Applications.

The User Portability Utilities Option (UPE).

Software Development Utilities.

POSIX.3.

POSIX.4.

POSIX.5.

Security.

Networks.

Profiles and POSIX Standards.

Appendix Summary.

Appendix E: The Free Software Definition.
Glossary.
Index. 0201703130T12102002

Preface

This is a straightforward, easy-to-read, logically organized book about GNU/Linux1 by an author who has been writing successful books on UNIX/Linux operating systems for over 20 years. It is for people with some computer experience but little or no experience with a UNIX/Linux system.

This book is a practical guide because it uses tutorial examples to show you how each command works, each step of the way. Your screen mimics what you see in the book as you learn about GNU/Linux in general and Red Hat Linux version 7 in particular.

In Parts I and II, A Practical Guide to Red Hat Linux shows you how to

  • Log in on and get familiar with your system--Chapters 2-5
  • Use and customize graphical user interfaces (GUIs)--Chapters 6-8
  • Understand and use networks--Chapter 9
  • Master the vim and emacs text editors--Chapters 10-11
  • Work with the bash, tcsh, and zsh Shells--Chapters 12-15
  • Write complex shell programs (scripts)--Chapters 13-15
  • Use sophisticated software development tools--Chapter 16
  • Perform system administration--Chapter 17 Part III is a reference guide to more than 85 GNU/Linux utilities.

You do not have to read this book in page order. Once you are comfortable using GNU/Linux, you can use it as a reference book: Look up a topic of interest in the index and read about it. Or think of this book as a catalog of GNU/Linux topics: flip through the pages until a topic catches your eye. This book has many pointers to Web sites where you can get additional information: Consider the Web as an extension of this book.

Audience

This book appeals to a a wide range of readers; it does not require programming experience, but some experience using any general-purpose computer is helpful. It is appropriate for

  • Students taking a class in which they use GNU/Linux
  • People who want to set up and/or run GNU/Linux at home
  • Professionals who use GNU/Linux at work
  • Computer science students studying the GNU/Linux operating system
  • Programmers who need to understand the GNU/Linux programming environment
  • Technical Executives who want to get a grounding in GNU/Linux

Benefits

A Practical Guide to Red Hat Linux gives you a broad understanding of many facets of GNU/Linux, from using it through customizing it. Whether you are a programmer/ developer or an end user, this book gives you the knowledge you need to get on with your work: You will come away from this book understanding how to use GNU/Linux and this book will remain a valuable reference tool for years to come.

Scope of Coverage

A Practical Guide to Red Hat Linux covers a wide range of topics. The following sections highlights some of the features of this book.

Parts I, II, and III

A Practical Guide to Red Hat Linux shows you how to use Red Hat Linux from your screen and keyboard. Part I comprises Chapters 1-5, which introduce new users To red Hat Linux: introduction, logging on, basic utilities, filesystem structure, and the shell. Part I contains step-by-step tutorials covering the most important aspects of the GNU/Linux operating system.

Part II comprises Chapters 6 through 17, which cover intermediate and advanced aspects of Red Hat Linux: GUI interfaces, networking, the vim and emacs editors, the Bourne Again, TC, and Z Shells and shell scripts, programming tools, and system administration.

Part III offers a comprehensive, detailed reference to more than 85 GNU/Linux utilities, with numerous examples. If you are already familiar with UNIX/Linux this part of the book will be a valuable, easy-to-use reference. If you are not an experienced user, you will find Part III a useful supplement while you are mastering the subjects and tutorials in Parts I and II.

|| TIP: Experienced Users May Want to Skim Part I

If you have used a UNIX/Linux system before you may want to skim over or skip some or all of the chapters in Part I. All readers should take a look at "Conventions" (page 27), which explains the typographic and layout conventions that this book uses, and "Documentation beef up infcoverage" (page 46) which points you toward both local and remote sources of GNU/Linux and Red Hat documentation.

The more advanced material in each chapter is presented in sections marked "Optional," which you are encouraged to return to after mastering the basic material presented in the chapter. Review exercises are included at the end of each chapter for readers who want to hone their skills. Some of the exercises test the reader's understanding of material covered in the chapter, while others challenge the reader to go beyond the material presented to develop a more thorough understanding.

Features by Chapter

This book features:

  • The history and background of GNU/Linux (Chapter 1)
  • Conventions used in this book, how to log in on your system, and using the documentation systems (Chapter 2)
  • Basic utilities (Chapter 3)
  • The GNU/Linux filesystem structure (Chapter 4)
  • The (generic) shell (Chapter 5)
  • An introduction to GUIs including the X Window System (Chapters 6)
  • The X Window System: Use and customization (Chapter 6)
  • The GNOME desktop environment (GUI interface, Chapter 7)
  • The KDE desktop environment (GUI interface, Chapter 8)
  • Networks: concepts, terminology, and practical instructions for setting up a secure network (Chapters 9 and 17)
  • Secure utilities: ssh, scp, gpg, lokkit, and more (Chapter 9, Part III, and Appendix C)
  • The vim and emacs text editors (Chapters 10 and 11)
  • Using the shells interactively and as programming languages: the Bourne Again Shell--bash--(Chapters 12 and 13), the TC Shell--tcsh--(Chapter 14), and the Z Shell--zsh--(Chapter 15).
  • Programming tools: C, make, source code management--RCS and CVS-- (Chapter 16)
  • System administration (Chapter 17)
  • Over 85 utilities including many examples (Part III)
  • Appendixes covering
  • Regular expressions (Appendix A)
  • Finding software and pointers to useful Web pages (Appendix B)
  • Security: An overview of this important topic (Appendix C)
  • POSIX: standards that specify a standard UNIX/Linux (Appendix D)
  • GNU's Free Software Definition (Appendix E)
  • A comprehensive glossary of over 500 words and phrases
  • A comprehensive index

Features by Concept

  • Concepts illustrated by practical examples throughout
  • A security conscious perspective: Places where you can improve system security, including network security, are pointed out by security boxes throughout the book
  • Key topics with tutorials: pico, vim (vi improved), and emacs text editors; pine mail and news reader, and more
  • Finding and installing software: Web sites, rpm, and the GNU Configure and Build System
  • Finding online documentation--both local and on the Internet
  • Important GNU tools including gcc, gdb, GNU Configure and Build System, gawk, gzip, and many others

Tutorials

  • pictext editor
  • emacs text editor and programmer's environment
  • vim (vi improved) editor
  • pine as a mail program
  • pine as a newsreader

Assistance

  • Many examples throughout
  • Comprehensive index
  • Caution boxes warn you of the consequences of taking certain actions
  • Security boxes alert you to security issues
  • Tip boxes help you avoid pitfalls
  • Help in obtaining online documentation from many sources including your local system, the Red Hat documentation CDROM, the Red Hat Web site, GNU, and other locations on the Internet
  • Appendix B, Help! lists many useful URLs (Internet addresses) where you can obtain software, security programs and information, and more

Features by Topic

Red Hat Linux

  • A Practical Guide to Red Hat Linux is based on Red Hat version 7.3, although much of it is compatible with other versions and distributions of GNU/Linux
  • A complete chapter and more on the GNU/Linux filesystem and Red Hat's implementation: structure, types of files, links, pathnames, permissions, locations for common files; and utilities that change filesystems
  • System administration under Red Hat Linux: Red Hat has built and contributed to many tools for system administration including rpm (Red Hat Program Manager) which makes it a simple matter to install or remove program packages, RHN (Red Hat Network) which can keep your system programs and files up-to-the-minute up-to-date automatically, redhat-config-users (sets up users on the system), printconf-gui (configures printers), and many more.
  • A chapter each on the GNOME version 2 and KDE version 3 graphical desktops as configured by Red Hat.

Networking, the Internet, and the World Wide Web

Chapter 9 explains what a network is, how it works, and how you can use it. It coves types of networks, various network implementations, distributed computing, how to use the network for communicating with other users, and using various networking utilities (such as ssh, scp, telnet, ftp, pine, host, and more).

  • Broad Internet coverage including firewalls, network services, types of networks and their operation, network protocols, and IPv6.
  • Complete instructions on using free software: finding, downloading, and installing free software from the Internet using a variety of tools
  • Guidance on using networking tools including ping, host, dig, traceroute, swat (Samba), and more
  • Coverage of distributed computing including DNS, NIS, NFS, proxy servers, Internet services, and more.

Organizing Information

In Chapters 2, 3, and 4, you learn how to create, delete, copy, move, and search for information using GNU/Linux utilities. You will also learn how to use the GNU/Linux file structure to organize the information you store on your computer.

Electronic Mail and Telecommunications

Chapters 2, and 3, and Part III include information on how to use utilities (pine, mail, talk, write) to communicate with users on your system and other systems. Chapter 9 details how to address electronic mail to users on remote, networked systems. Chapter 17 has a section on using sendmail.

The Shells

Chapter 5 is an introductory shell chapter that introduces the concepts of standard input, standard output, redirection, pipes, background processes, filename generation, and builtin commands. It shows you how to redirect output from a program to a printer or a file--just by changing the command line. It also demonstrates how you can use pipes to combine utilities to solve problems right from the command line.

Shell Programming (Shell Scripts)

Once you have mastered the basics of Red Hat Linux, you can use your knowledge to build more complex and specialized programs using a shell as a programming language. Chapter 12 picks up where Chapter 5 leaves off, covering more advanced aspects of working with a shell, using the Bourne Again Shell--bash, the shell used almost exclusively for system shell scripts--for examples. Chapter 13 shows how to use bash to write scripts composed of GNU/Linux system utilities. Chapter 14 covers the TC Shell--tcsh, an improved version of Berkeley's C Shell. Chapter 15 covers the Z Shell--zsh, similar to the Korn Shell--extending the concepts of shell programming introduced in Chapter 13 into more advanced areas, including more information on the locality of variables, recursion, and the coprocess.

The examples in Part III also demonstrate many features of the utilities you can use in shell scripts.

Job Control

The job control commands, which originated on Berkeley UNIX, allow you to work on many jobs at once from a single window, and switch back and forth between the jobs as desired. Job control is available under the three major Shells.

Shell Functions

Shell Functions are available in the bash and zsh Shells and enable you to write your own commands that are similar to the aliases provided by the TC Shell, only more powerful.

The X Window System and Graphical User Interfaces (GUIs)

Chapter 6 discusses the X Window system and how to open and control windows, customize your X work environment, and use some of the features common to GNOME and KDE. Chapter 7 covers GNOME while Chapter 8 covers KDE.

X Window System
  • Window managers
  • Bringing up and shutting down the X Window System
  • Setting X resources
  • Using the X Window System
  • Customizing the X Window System
  • Remote Computing and Local Displays
GNOME Graphical Desktop
  • Main panel: control center of the GNOME desktop
  • Menus: the key to using GNOME
  • Nautilus file manager and browser: The cornerstone GNOME utility including the Start Here window, control bars, and properties.
  • GNOME utilities: Search, terminal emulator, pick a font, pick a color, MIME types, and much more
  • Customizing GNOME: Nautilus, panels, and menus
  • Metacity window manager: how to use and customize this simple, compact window manager
  • Sawfish window manger: window operations, menus, and configurator
KDE Graphical Environment
  • Main panel (kicker): Control center of the KDE desktop
  • Menus: The key to using KDE, including the Desktop menu and menubar, Taskbar, Window List menu, and Operations menu
  • Konqueror browser and file manager: Views, toolbars, find files, shortcuts, Navigation panel
  • How to get help: What's this?, KHelpcenter, Help menu
  • Window manager: using and modifying kwin
  • Customizing KDE: Control center, panels, toolbars, K Menu editor, autostart, and sound.

Utilities

Linux includes hundreds of utilities. Part III contains extensive examples of how to use many of these utilities to solve problems without resorting to programming in C (or another language). The example sections of gawk (over 20 pages, starting on page 1239), sed (page 1378), and sort (page 1395) give real-life examples that demonstrate how to use these utilities alone and with other utilities to generate reports, summarize data, and extract information.

Secure Utilities

Many newer utilities establish secure connections, encrypt data, and verify the identify of the creator/sender of files. Appendix C discusses security issues and solutions while Chapter 9 and Part III explain the use of secure utilities including ssh, scp, and pgp.

The vim Editor

Red Hat Linux supplies the vim text editor, an "improved" version of vi. The vi editor was originally a part of Berkeley UNIX and is still one of the most widely used text editors. Chapter 10 starts with a tutorial on vim and goes on to explain how to use many of the advanced features of vim, including special characters in search strings, the general-purpose and named buffers, parameters, markers, and executing commands from vim.

The emacs Editor

Red Hat Linux supplies the popular GNU emacs editor. Chapter 11 includes information on emacs and the X Window System, allowing you to use a mouse and take advantage of X Window System features such as menus and cut and paste with emacs. This chapter explains how to use many of the features of this versatile editor, from a basic orientation to the use of the META, ALT, and ESCAPE keys; key bindings, buffers, the concept of Point, the cursor, Mark, and Region, incremental and complete searching for both character strings and regular expressions; using the online help facilities, cutting and pasting (from the keyboard and with a mouse), and using multiple windows and frames; and C Mode, which is designed to aid programmers in writing and debugging C code. The chapter concludes with a summary of emacs commands.

Regular Expressions

Many UNIX utilities allow you to use regular expressions to make your job easier. Appendix A explains how to use regular expressions, so that you can take advantage of some of the hidden power of your GNU/Linux system.

System Administration

Chapter 17 explains how to set up, control, and keep secure a Red Hat Linux system. It details the responsibilities of the Superuser and explains how to bring up and shut down a Red Hat Linux system, add users to the system, back up files, set up new devices, check the integrity of a filesystem, and more. This chapter goes into detail about the structure of a filesystem and explains what administrative information is kept in various files. In addition, this 175+ page chapter presents an overview of installing Red Hat Linux, information on rebuilding the GNU/Linux kernel, a section on how to manage user accounts, and security boxes throughout.

  • Use the Superuser (root) account
  • Download Red Hat Linux from the Internet and burn a CDROM
  • Find/add/remove rpm software packages with use rpmfind, rpm, and kpackage
  • Install non-rpm software with the GNU Configure and Build System
  • Understand and manage basic security issues with secure programs including ssh (secure shell), and GnuPG (GNU Privacy Guard)
  • Add and remove users with redhat-config-users and kuser
  • Use RHN (Red Hat Network) to keep your system software up to date automatically
  • Build a firewall with gnome-lokkit
  • Manage local and remote printers with printconf-gui and KDEPrint
  • Use graphical system administration tools including GNOME Start Here, GNOME and KDE menu systems, KDE Control Center, and KDE Control Panel
  • Understand system operation including the boot process, rc scripts, emergency mode, single- and multiuser mode, and what to do when the system crashes
  • Learn about files, directories, and filesystems including types of files and filesystems, fstab, automatically mounted filesystems, filesystem integrity checks, filesystem utilities, and how to tunene filesystems
  • Use backup utilities including tar, cpio, dump, and restore
  • Use the /proc filesystem
  • Configure network services: Proxies, NFS (Network File System), DNS (Domain Name Service), automount filesystems, Samba server, OpenSSH
  • Rebuild the Kernel
  • Plan disk layout and partition disks
  • Run system reports
  • Manage printers
  • Connect to the Internet
  • Rebuild the kernel
  • Configure PAM (pluggable authentication modules)
  • Use administration utilities

Programming Environment

  • Manage source code with RCS or CVS
  • Use make to keep a set of programs current
  • Use the GNU C compiler (gcc) and debugger (dbg)
  • Work with shared libraries
  • Understand system calls

Programming Tools

Chapter 16 introduces you to GNU/Linux's exceptional programming environment. This chapter describes how to use some of the most useful software development tools: gcc (the GNU C compiler), the gdb debugger, make, and the CVS and RVS source code management tools. The make utility automates much of the drudgery involved in ensuring that a program you compile contains the latest versions of all program modules. CVS and RVS help you manage source code by tracking multiple versions of files on a number of different types of projects.

POSIX

The IEEE POSIX committees have developed standards for programming and user interfaces based on historical UNIX practice, and new standards are under development. Appendix D describes these standards and their direction and effect on the UNIX industry.

Supplements

My home page (www.sobell.com) contains downloadable listings of the longer programs from the book; current pointers to many interesting and useful Red Hat Linux sites on the World Wide Web; a list of corrections to the book; answers to selected exercises, and a solicitation for corrections, comments, suggestions, and additional programs and exercises.

I take responsibility for errors and omissions. If you find one or just have a comment, let me know (mark@sobell.com), and I'll fix it in the next printing. My home page (www.sobell.com) contains a list of all the errors found so far, and who found them. It also contains copies of the longer scripts from the book and pointers to many interesting GNU/Linux pages. Mark G. Sobell
San Francisco, California
1Proper credit is due the Free Software Foundation/GNU for its contribution to the operating system which is commonly referred to as Linux. Thus, This book uses the name GNU/Linux in places where others use Linux by itself. Red Hat Linux is a distribution of GNU/Linux. Refer to the beginning of Chapter 1 for more information on the development of GNU/Linux.

0201703130P09052002

Index

Click below to download the Index file related to this title:
Index

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020