ptg
A Practical Guide to Fedora and
Red Hat Enterprise Linux
FIFTH EDITION
Mark G. Sobell
Upper Saddle River, NJ ? Boston ? Indianapolis ? San Francisco
New York ? Toronto ? Montreal ? London ? Munich ? Paris ? Madrid
Capetown ? Sydney ? Tokyo ? Singapore ? Mexico City
? ?
?
From the Library of Skyla Walker
ptg
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where
those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed
with initial capital letters or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any
kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in
connection with or arising out of the use of the information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may
include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and
branding interests. For more information, please contact:
U.S. Corporate and Government Sales
(800) 382-3419
corpsales@pearsontechgroup.com
For sales outside the United States, please contact:
International Sales
international@pearson.com
Visit us on the Web: informit.com/ph
Library of Congress Cataloging-in-Publication Data
Sobell, Mark G.
A practical guide to Fedora and Red Hat Enterprise Linux / Mark G.
Sobell.—5th ed.
p. cm.
Includes index.
ISBN 978-0-13-706088-7 (pbk.)
1. Linux. 2. Operating systems (Computers) I. Title.
QA76.76.O63S5945 2010
005.4'32—dc22
2009053421
Copyright ? 2010 Mark G. Sobell
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must
be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any
form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions,
write to:
Pearson Education, Inc.
Rights and Contracts Department
501 Boylston Street, Suite 900
Boston, MA 02116
Fax: (617) 671-3447
ISBN-13: 978-0-13-706088-7
ISBN-10: 0-13-706088-2
Text printed in the United States at Edwards Brothers in Ann Arbor, Michigan.
First printing, February 2010
From the Library of Skyla Walker
ptg
xi
Brief Contents
Contents xiii
Preface xxxvii
1 Welcome to Linux 1
PART I Installing Fedora and Red Hat
Enterprise Linux 21
2 Installation Overview 23
3 Step-by-Step Installation 51
PART II Getting Started with Fedora and Red Hat
Enterprise Linux 87
4 Introduction to Fedora and Red Hat Enterprise Linux 89
5 The Linux Utilities 147
6 The Linux Filesystem 187
7 The Shell 223
PART III Digging into Fedora and Red Hat
Enterprise Linux 253
8 Linux GUIs: X and GNOME 255
9 The Bourne Again Shell 279
10 Networking and the Internet 357
From the Library of Skyla Walker
ptg
xii Brief Contents
PART IV System Administration 401
11 System Administration: Core Concepts 403
12 Files, Directories, and Filesystems 467
13 Downloading and Installing Software 497
14 Printing with CUPS 519
15 Rebuilding the Linux Kernel 543
16 Administration Tasks 555
17 Configuring and Monitoring a LAN 595
PART V Using Clients and Setting Up Servers 619
18 OpenSSH: Secure Network Communication 621
19 FTP: Transferring Files Across a Network 643
20 sendmail: Setting Up Mail Clients, Servers, and More 669
21 NIS and LDAP 695
22 NFS: Sharing Filesystems 727
23 Samba: Integrating Linux and Windows 749
24 DNS/BIND: Tracking Domain Names and Addresses 773
25 iptables: Setting Up a Firewall 819
26 Apache (httpd): Setting Up a Web Server 841
PART VI Programming Tools 885
27