Tải bản đầy đủ (.pdf) (902 trang)

suse linux 10 bible 2006

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (22.49 MB, 902 trang )

SUSE Linux
®
10 Bible
01_754889 ffirs.qxp 12/27/05 7:06 PM Page i
01_754889 ffirs.qxp 12/27/05 7:06 PM Page ii
SUSE Linux
®
10
Bible
Justin Davies
Roger Whittaker
William von Hagen
01_754889 ffirs.qxp 12/27/05 7:06 PM Page iii
SUSE Linux
®
10 Bible
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2006 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN-13: 978-0-471-75488-6
ISBN-10: 0-471-75488-9
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
1O/RZ/QR/QW/IN
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of


the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through
payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978)
750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley
Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://
www.wiley.com/go/permissions.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR
WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND
SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A
PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS.
THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS
SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT
PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR
DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS
A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE
PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS
IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY
HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services or to obtain technical support, please contact our Customer
Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Library of Congress Cataloging-in-Publication Data
Davies, Justin, 1979–
Suse Linux 10 bible / Justin Davies, Roger Whittaker, and William von Hagen.
p. cm.
Includes index.
ISBN-13: 978-0-471-75488-6 (paper/dvd)
ISBN-10: 0-471-75488-9 (paper/dvd)
1. Linux. 2. Operating systems (Computers) I. Whittaker, Roger, 1955– II. Von Hagen, William. III. Title.
QA76.76.O63D34992 2006
005.4'32—dc22

2005027885
Trademarks: Wiley, the Wiley logo, and related trade dress are trademarks or registered trademarks of John Wiley & Sons,
Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. SUSE
Linux is a registered trademark of SUSE Linux Products GmbH, a Novell company, in the United States and other countries.
Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. Wiley
Publishing, Inc., is not associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in
electronic books.
01_754889 ffirs.qxp 12/27/05 7:06 PM Page iv
About the Authors
Justin Davies has been a user of Linux since the age of 15, after getting frustrated at
the (lack of) features of DOS. After University, he joined SUSE Linux as a Technical
Consultant where he became very interested with Linux on non-Intel architecture.
After a stint as a Unix Administrator post-SUSE, he joined the world of the value-
added reseller and now works for SCC as an Enterprise Solutions Architect, helping
organizations realize that Linux is a viable business solution.
After working as a teacher of Mathematics and Deputy Head of an independent
school in London, Roger Whittaker discovered Linux in 1996 and became increasingly
interested (some would say obsessed with) in the software. When SUSE Linux opened
the company’s UK office in 1999, he changed careers and worked as a technical and
training consultant until early in 2004. He now works in London as a Linux consultant.
He is a Council member of UKUUG, the UK’s Unix and Open Systems user group.
William von Hagen has been a Unix system administrator for 20 years and a Linux
fanatic since 1993. He has also worked as a systems programmer, product manager,
writer, application developer, drummer, and content manager. Bill has written books
on such topics as Linux filesystems, Red Hat Linux, GCC, SGML, Mac OS X, Linux
system administration, and hacking the TiVo. He has written numerous articles
on Linux, Unix, and open source topics for publications including Linux Magazine,
Linux Journal, Linux Format, and Mac Format. An avid computer collector specializing
in workstations, he owns more than 200 computer systems.

01_754889 ffirs.qxp 12/27/05 7:06 PM Page v
Credits
Contributor
Paul Weinstein
Executive Editor
Carol Long
Acquisitions Editor
Debra Williams Cauley
Development Editor
Kevin Kent
Technical Editors
Lenz Grimmer
Rob Foster
Peter Macmillan
Copy Editor
Michael Koch
Editorial Manager
Mary Beth Wakefield
Production Manager
Tim Tate
Vice President and Executive
Group Publisher
Richard Swadley
Vice President and
Executive Publisher
Joseph B. Wikert
Project Coordinator
Michael Kruzil
Graphics and Production Specialists
Carrie A. Foster

Lauren Goddard
Denny Hager
Joyce Haughey
Stephanie D. Jumper
Barbara Moore
Heather Ryan
Alicia South
Quality Control Technicians
David Faust
Leeann Harney
Joe Niesen
Brian H. Walls
Media Development
Associate Producer
Rich Graves
Media Development Specialist
Kate Jenkins
Media Development Coordinator
Laura Atkinson
Proofreader
Sossity R. Smith
Indexing
TECHBOOKS Production Services
01_754889 ffirs.qxp 12/27/05 7:06 PM Page vi
To my wife, Aimee
—Justin Davies
To Shekufeh and Golnaz,
who tolerate all this
—Roger Whittaker
For Dorothy Fisher,

my wife and best friend
—Bill von Hagen
01_754889 ffirs.qxp 12/27/05 7:06 PM Page vii
01_754889 ffirs.qxp 12/27/05 7:06 PM Page viii
Foreword
M
y Brothers and Sisters,
Should we accept that this book is indeed a Bible? Let us use a dictionary to see
what the definition of a Bible is.
The first definition is marked obsolete, and just means “a book.” I think that anyone
would agree that this tome is a Bible by that definition.
The second definition was the one that most know, “The Book by way of eminence . . .
accepted as of divine authority and origin.” Well, Linux has long been known for its
gurus who hand out small snippets of sage advice. Sometimes that sage advice is
in many books, and beginners are often told RTFM (Read The Freaking Manual).
Easy enough for the guru to say, but when there are so many manuals, HOWTOs,
and other pieces of information scattered about, how do you put it all together?
Therefore, a Bible is necessary. Hopefully it carries information pertinent to your own
religion, or in this case distribution. If the Bible tries to cover the information in every
distribution, the reader may become lost. That is why this is SUSE Linux 10 Bible,
and not some other brand of Linux.
Some people say that Linux and Free and Open Source (FOSS) are a religion, and
that the people that support it are religious zealots. I don’t think that is true, for
the people I know in FOSS are multifaceted. But when it comes to programming, we
believe that Linux and FOSS offer education, government, and business the most
flexible, powerful, and lowest-cost solution. All you have to do is reach out and
accept that fact.
Like any good religion you have to practice it, study it, and really understand what is
being said to you. You also have to apply it to your life. Look for ways in your life that
this software can help you, whether to organize your life or your business better.

Many people think that Total Cost of Ownership (TCO) is simply made up of the
cost of the hardware, software, and services of the solution you pick. How naive.
TCO is also made up of the cost of not picking a better solution, one that is flexible
enough for you to solve 99 percent of your problems instead of 80 percent of your
problems. How much does it cost you not to be able to solve that 19 to 20 percent?
01_754889 ffirs.qxp 12/27/05 7:06 PM Page ix
x
Foreword
The Freedom that you get when you use FOSS is the key to this savings, or (in reverse)
the additional earning power. To be able to fully tailor the software to meet your
needs is the greatest value of FOSS. But you can’t do this without knowledge.
This is where this Bible comes in, to give you the knowledge to go out and explore
further.
So, my brothers and sisters, throw off the shackles of proprietary software and
learn how to make software do what you want it to do. Open the pages of this
Bible and see your life change. Welcome to the bright side of “The Force.”
Carpe Diem!
Jon “maddog” Hall
President, Linux International
01_754889 ffirs.qxp 12/27/05 7:06 PM Page x
Preface
W
elcome to SUSE Linux
®
10 Bible! This book is for anyone who is interested
in running a SUSE Linux system—at home or at work, for fun or for profit.
It covers all the currently available versions from SUSE: The 10 in the title refers to
Enterprise Server 10, SUSE Linux 10.x and OpenSUSE 10.x. Most of the content applies
equally to previous versions as well, however. We shall also describe other SUSE
and Novell business products: the Novell Linux Desktop and the Open Enterprise

and OpenExchange Servers.
The book aims to supplement the documentation provided by SUSE and to show
the reader how best to carry out a particular task on a SUSE system, making full use
of the SUSE configuration utilities. Many Linux books and how-to documents pro-
vide generic instructions for carrying out particular tasks; however, it often turns
out that these are either incorrect in the details or unnecessarily complicated when
applied to a particular distribution. In this book we aim to describe the best ways
of working with SUSE in a wide variety of situations, making full use of the SUSE
configuration tools.
Too often, computer books tend to be written only from the standpoint of how to
perform a task and fail to provide a real understanding of the underlying principles.
Our aim in this book is to combine a description of the steps necessary to perform
a particular task with a real understanding of what is being done.
While we discuss the use of SUSE Linux in enterprise applications, with examples
based on our own consulting experience, the book is also for home users getting
to grips with Linux for the first time. In short, we aim for SUSE Linux 10 Bible to be
what you need to run your SUSE Linux system, whatever your situation might be.
How This Book Is Structured
We’ve organized this book into five parts:
✦ Part I: SUSE Linux Basics—This part introduces SUSE Linux by describing
the installation of a SUSE system and discussing the fundamental concepts of
Linux.
✦ Part II: The SUSE System—This part describes the use of YaST for system
configuration, explains Linux networking, system logs, the X Window system,
and helps you to find further documentation.
02_754889 fpref.qxp 12/27/05 7:03 PM Page xi
xii
Preface
✦ Part III: Using the Command Line in SUSE Linux—This part covers the
power of the Linux command line, with chapters covering text editing and

tools for manipulating text files, as well as package maintenance and
advanced networking.
✦ Part IV: Implementing Network Services in SUSE Linux—This part
describes the setup of the major network services on a SUSE system, includ-
ing setting up web servers, mail servers, and file and print servers.
✦ Part V: SUSE Linux in the Enterprise—This part describes the place of SUSE
Linux in the modern enterprise and covers the use of storage area networks
(SANs). The configuration of the kernel is also covered. The SUSE
OpenExchange server is described in detail, and an overview is offered of the
Novell Open Enterprise Server. The Novell Linux desktop is also discussed.
Conventions Used in This Book
Throughout the book, special typeface indicates code or commands. Commands
and code are shown in monospace type:
This is how code looks.
Additionally, the following icons are used to call your attention to points that are
particularly important.
A Caution warns you to be careful when executing a procedure or you could
damage your computer hardware or software.
A Cross-Reference refers you to further information on a subject that you can find
outside the current chapter.
A Note provides extra information to which you need to pay special attention.
A Tip shows a special way of performing a particular task or introduces a shortcut
to ease your way.
We hope you enjoy working with your SUSE Linux system as much as we enjoy
working with ours, and we know that SUSE Linux 10 Bible will be an invaluable tool
to help you get the most out of it.
Tip
Note
Cross-
Reference

Caution
02_754889 fpref.qxp 12/27/05 7:03 PM Page xii
xiii
Preface
DVD and Web Site
This book comes with a DVD containing a full copy of SUSE 10.0 for computers with
x86, AMD64, or EM64T processors. Additionally, check out this book’s web site at
www.wiley.com/go/suselinux10bible periodically for additional and updated con-
tent. For more great books on Linux from Wiley, you can point your browser to
www.wiley.com or www.wrox.com.
02_754889 fpref.qxp 12/27/05 7:03 PM Page xiii
Contents at a Glance
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Part I: SUSE Linux Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1: Installing SUSE 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Chapter 2: Linux Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Chapter 3: Partitions, Filesystems, and Files. . . . . . . . . . . . . . . . . . . . . . 77
Part II: The SUSE System . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Chapter 4: Booting the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Chapter 5: Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Chapter 6: Understanding Your Linux Network . . . . . . . . . . . . . . . . . . . 155
Chapter 7: Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Chapter 8: The X Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Chapter 9: Configuring the System with YaST . . . . . . . . . . . . . . . . . . . . 221
Part III: Using the Command Line in SUSE Linux . . . . . . . . . . . . 267
Chapter 10: Text Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Chapter 11: Text Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Chapter 12: Working with Packages . . . . . . . . . . . . . . . . . . . . . . . . . . 323

Chapter 13: Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Chapter 14: Working with the System . . . . . . . . . . . . . . . . . . . . . . . . . 373
Chapter 15: Linux Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xiv
Part IV: Implementing Network Services in SUSE Linux. . . . . . . . 443
Chapter 16: Setting Up a Web Site with the Apache Web Server . . . . . . . . . . 445
Chapter 17: Mail Servers — Postfix, Sendmail, Qpopper, and Cyrus . . . . . . . 463
Chapter 18: Setting Up Windows Interoperability with Samba . . . . . . . . . . . 495
Chapter 19: Setting Up Printing with CUPS . . . . . . . . . . . . . . . . . . . . . . 527
Chapter 20: Configuring and Using DHCP Services . . . . . . . . . . . . . . . . . 547
Chapter 21: Configuring a DNS Server . . . . . . . . . . . . . . . . . . . . . . . . . 569
Chapter 22: Working with NFS and NIS . . . . . . . . . . . . . . . . . . . . . . . . 583
Chapter 23: Running an FTP Server on SUSE . . . . . . . . . . . . . . . . . . . . . 603
Chapter 24: Implementing Firewalls in SUSE Linux . . . . . . . . . . . . . . . . . 613
Chapter 25: Working with LDAP in SUSE . . . . . . . . . . . . . . . . . . . . . . . 635
Chapter 26: Setting Up a Web Proxy with Squid . . . . . . . . . . . . . . . . . . . 655
Part V: SUSE Linux in the Enterprise . . . . . . . . . . . . . . . . . . . 667
Chapter 27: Enterprise Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . 669
Chapter 28: Emulation and Virtualization . . . . . . . . . . . . . . . . . . . . . . . 693
Chapter 29: The Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
Chapter 30: SUSE Linux OpenExchange Server. . . . . . . . . . . . . . . . . . . . 739
Chapter 31: The Novell Open Enterprise Server . . . . . . . . . . . . . . . . . . . 783
Chapter 32: Business Desktop Linux: The Novell Linux Desktop. . . . . . . . . . 797
What’s on the DVD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xv
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xvi
Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii
Part I: SUSE Linux Basics 1
Chapter 1: Installing SUSE 10 . . . . . . . . . . . . . . . . . . . . . . . . . 3
Selecting Your Installation Method. . . . . . . . . . . . . . . . . . . . . . . . . 3
Starting Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Selecting Boot Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Configuring Language Settings. . . . . . . . . . . . . . . . . . . . . . . . 9
Media Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Customizing the Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Selecting Your Desktop Environment . . . . . . . . . . . . . . . . . . . 11
Installation Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Customizing Your Installation . . . . . . . . . . . . . . . . . . . . . . . 12
Partitioning Your Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Resizing Existing Operating System Partitions . . . . . . . . . . . . . . 16
Primary and Extended Partitions . . . . . . . . . . . . . . . . . . . . . 17
Defining Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Selecting Software for Installation . . . . . . . . . . . . . . . . . . . . . 23
Selecting a Boot Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Changing the Default Runlevel . . . . . . . . . . . . . . . . . . . . . . . 27
Running the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Configuring Your Root Password. . . . . . . . . . . . . . . . . . . . . . 30
Configuring Your Network Access . . . . . . . . . . . . . . . . . . . . . 30
Testing Your Connection and Online Updates . . . . . . . . . . . . . . 34
Configuring Your Modem . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ISDN and ADSL Connections . . . . . . . . . . . . . . . . . . . . . . . . 36
Adding a New User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
SuSEconfig. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Reviewing the Release Notes . . . . . . . . . . . . . . . . . . . . . . . . 39
Configuring Your Hardware . . . . . . . . . . . . . . . . . . . . . . . . . 40

Completing Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xvii
xviii
Contents
Chapter 2: Linux Fundamentals . . . . . . . . . . . . . . . . . . . . . . . 47
Command Line 101: The Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Commonly Used Shell Features. . . . . . . . . . . . . . . . . . . . . . . 48
Advanced Shell Features . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Getting Help for Linux Commands . . . . . . . . . . . . . . . . . . . . . . . . 55
Working with Files and Directories . . . . . . . . . . . . . . . . . . . . . . . . 55
Listing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Copying Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Moving and Renaming Files . . . . . . . . . . . . . . . . . . . . . . . . . 57
Deleting Files and Directories. . . . . . . . . . . . . . . . . . . . . . . . 57
Changing Directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Making Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Removing Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Making Links to Files or Directories . . . . . . . . . . . . . . . . . . . . 58
Concatenating Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Viewing Files with more and less. . . . . . . . . . . . . . . . . . . . . . 59
Viewing the Start or End of Files . . . . . . . . . . . . . . . . . . . . . . 60
Searching Files with grep . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Finding Files with find and locate . . . . . . . . . . . . . . . . . . . . . 61
Editing Text with vi and emacs . . . . . . . . . . . . . . . . . . . . . . . 61
Common Administrative Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Basic User and Group Concepts . . . . . . . . . . . . . . . . . . . . . . 62
Creating Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . 63
Working with File Ownership and Permissions. . . . . . . . . . . . . . 64
Configuring User Preferences. . . . . . . . . . . . . . . . . . . . . . . . 68
Mounting and Unmounting Filesystems . . . . . . . . . . . . . . . . . . 69

Working with Software Packages . . . . . . . . . . . . . . . . . . . . . . . . . 70
Checking What’s Installed. . . . . . . . . . . . . . . . . . . . . . . . . . 70
Examining RPM Packages . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Extracting Files from Packages . . . . . . . . . . . . . . . . . . . . . . . 71
Working with Source RPMs . . . . . . . . . . . . . . . . . . . . . . . . . 72
Compiling Source Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Connecting over the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Backing Up, Restoring, and Archiving Files . . . . . . . . . . . . . . . . . . . 75
Creating and Reading Simple Archives . . . . . . . . . . . . . . . . . . 75
Creating an ISO Image to Burn to CD. . . . . . . . . . . . . . . . . . . . 76
Chapter 3: Partitions, Filesystems, and Files . . . . . . . . . . . . . . . 77
Partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Types of Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Creating Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Updating a Disk’s Partition Table. . . . . . . . . . . . . . . . . . . . . . 85
Changing Partition Types . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
EXT2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
EXT3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
ReiserFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
JFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xviii
xix
Contents
XFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
VFAT/NTFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Creating Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Creating an EXT2 Filesystem . . . . . . . . . . . . . . . . . . . . . . . . 92
Creating an EXT3 Filesystem . . . . . . . . . . . . . . . . . . . . . . . . 93
Upgrading an EXT2 Filesystem to an EXT3 Filesystem . . . . . . . . . 94

Creating a ReiserFS Filesystem . . . . . . . . . . . . . . . . . . . . . . . 95
Filesystem Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Mounting Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Mount Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Mounting Filesystems Automatically. . . . . . . . . . . . . . . . . . . 104
Unmounting Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Part II: The SUSE System 107
Chapter 4: Booting the System. . . . . . . . . . . . . . . . . . . . . . . 109
Booting Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Runlevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Switching Runlevels Manually. . . . . . . . . . . . . . . . . . . . . . . 114
Using chkconfig to Control Runlevels . . . . . . . . . . . . . . . . . . 117
Customizing Runlevels for Different Types of Systems . . . . . . . . 118
Boot Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
LILO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
GRUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Dual Booting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Installing Windows and Linux on a New System . . . . . . . . . . . . 124
Installing Linux on an Existing Windows System . . . . . . . . . . . . 125
Manually Partitioning an Existing Windows System . . . . . . . . . . 126
Sharing Data on Windows and Linux Partitions. . . . . . . . . . . . . 128
Troubleshooting Booting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Fixing Boot Problems Using Runlevels . . . . . . . . . . . . . . . . . . 130
The SUSE Rescue System . . . . . . . . . . . . . . . . . . . . . . . . . 131
Chapter 5: Documentation . . . . . . . . . . . . . . . . . . . . . . . . . 135
Finding Help on Your SUSE System . . . . . . . . . . . . . . . . . . . . . . . 135
The SUSE Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Man Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Info Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
The SUSE Help Center . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

/usr/share/doc/packages/ . . . . . . . . . . . . . . . . . . . . . . . . . 142
Other Documentation Packages. . . . . . . . . . . . . . . . . . . . . . 143
Linux Documentation Project Resources . . . . . . . . . . . . . . . . . . . . 143
FAQs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
HOWTOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Linux Documentation Project Guides . . . . . . . . . . . . . . . . . . 145
The SUSE Books Package . . . . . . . . . . . . . . . . . . . . . . . . . 147
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xix
xx
Contents
Finding Help Online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
The SUSE Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
SUSE Public Mailing Lists . . . . . . . . . . . . . . . . . . . . . . . . . 149
The Unofficial SUSE FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Other Unofficial SUSE Help Sites . . . . . . . . . . . . . . . . . . . . . 149
Other SUSE Documents . . . . . . . . . . . . . . . . . . . . . . . . . . 149
SUSE Linux OpenExchange Server and OPEN-XCHANGE Web Sites. . . 150
Topic-Specific Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Finding Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Other Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
News Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
IRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Finding Further Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Chapter 6: Understanding Your Linux Network . . . . . . . . . . . . . 155
Internet 101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
TCP/IP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The ISO OSI Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The DoD Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
IP Addresses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
And Breathe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Chapter 7: Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Why Log? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
The Files in /var/log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Logging with syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Logging with syslog-ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
The Log Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
The Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
The Log Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
The Log Definition — Tying It All Together . . . . . . . . . . . . . . . 180
Future Directions for Linux Logging. . . . . . . . . . . . . . . . . . . . . . . 180
Managing Your Logs with logrotate . . . . . . . . . . . . . . . . . . . . . . . 181
Analyzing Your Logs with logcheck . . . . . . . . . . . . . . . . . . . . . . . 183
Using Webalizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Reading Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Chapter 8: The X Window System . . . . . . . . . . . . . . . . . . . . . 189
X Window System Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Window Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
KDE and GNOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Configuring X. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Getting Hardware Information. . . . . . . . . . . . . . . . . . . . . . . 193
Using sax2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Framebuffer Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Accessing Framebuffer Graphics after Installation . . . . . . . . . . . 196
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xx
xxi
Contents
If X Still Doesn’t Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Switching Resolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Copy and Paste in X . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
User Preferences in X. . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Using X Remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Diskless X Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
KDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Konqueror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
The KDE Control Center . . . . . . . . . . . . . . . . . . . . . . . . . . 207
KDE Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
GNOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Nautilus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Epiphany . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Evolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Gnucash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
AbiWord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Gnumeric. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Other Window Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
MWM and FVWM2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Blackbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
IceWM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
XFCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Window Maker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
FVWM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Building Your Own X Applications . . . . . . . . . . . . . . . . . . . . . . . 216
Development Requirements for X Applications. . . . . . . . . . . . . 216
Building Fluxbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Using Fluxbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Wrapping Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Chapter 9: Configuring the System with YaST . . . . . . . . . . . . . . 221
YaST Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Configuring Installation Sources. . . . . . . . . . . . . . . . . . . . . . . . . 226

Creating and Using Boot and Rescue Floppies. . . . . . . . . . . . . . . . . 228
Setting Up Proxy Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Using NTP Time Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Setting Up a Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Boot Loader Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Setting Up SCPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Runlevel Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Configuring DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Adding or Editing Users . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Adding or Editing Groups . . . . . . . . . . . . . . . . . . . . . . . . . 249
Installing Additional Software with YaST . . . . . . . . . . . . . . . . . . . . 250
YOU — The YaST Online Update . . . . . . . . . . . . . . . . . . . . . . . . 253
YOU on SUSE Professional and on SLES . . . . . . . . . . . . . . . . . 253
susewatcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xxi
xxii
Contents
The YaST Online Update Module . . . . . . . . . . . . . . . . . . . . . 254
YOU Dangers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
The YaST Installation Server Module . . . . . . . . . . . . . . . . . . . . . . 256
Setting Up an Installation Server . . . . . . . . . . . . . . . . . . . . . 257
Installing from the Installation Server . . . . . . . . . . . . . . . . . . 260
Autoinstallation — AutoYaST . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Mode of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
The YaST Autoinstallation Module . . . . . . . . . . . . . . . . . . . . 261
Using Pre-Install, chroot, and Post-Install scripts. . . . . . . . . . . . 264
Further Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Part III: Using the Command Line in SUSE Linux 267
Chapter 10: Text Manipulation. . . . . . . . . . . . . . . . . . . . . . . 269
Reading Lines from Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
cat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
tac. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
zcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
tail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
expand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
nl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
uniq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Extracting Lines from Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
grep. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
zgrep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
grepmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
sgrep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
csplit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Working with Fields from Text Files . . . . . . . . . . . . . . . . . . . . . . . 282
cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
join . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
awk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Getting Statistics about Text Files with wc . . . . . . . . . . . . . . . . . . . 286
Replacing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
sed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
tr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
dos2unix and unix2dos. . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Formatting Text Files for Viewing and Printing . . . . . . . . . . . . . . . . 290

pr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
fold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xxii
xxiii
Contents
fmt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
groff -Tascii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
a2ps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
enscript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Comparing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
cmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
diff and patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Getting Text out of Other File Formats . . . . . . . . . . . . . . . . . . . . . 295
antiword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
ps2ascii. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
ps2pdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
dvi2tty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
detex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
acroread and xpdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
html2text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Chapter 11: Text Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . 299
The Politics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
vi/vim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Using Command Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Moving Around the Text . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Deleting Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Copying and Pasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Inserting and Saving Files . . . . . . . . . . . . . . . . . . . . . . . . . 308
Searching and Replacing . . . . . . . . . . . . . . . . . . . . . . . . . . 309

Using the vim Initialization File . . . . . . . . . . . . . . . . . . . . . . 310
Exiting vim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What to Install. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Starting emacs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Controlling emacs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Using Word Completion . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Using Command Completion and History . . . . . . . . . . . . . . . . 316
emacs Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Using the Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Customizing emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Chapter 12: Working with Packages . . . . . . . . . . . . . . . . . . . 323
Binary RPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Installing an RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Querying RPM Packages . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Removing Installed Packages . . . . . . . . . . . . . . . . . . . . . . . 328
Verifying an RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xxiii
xxiv
Contents
Creating an RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Distribution RPMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
The RPM Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
The Spec File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Compiling an RPM from the Spec File . . . . . . . . . . . . . . . . . . 339
Checking the Finished RPM . . . . . . . . . . . . . . . . . . . . . . . . 341
Chapter 13: Working with Files . . . . . . . . . . . . . . . . . . . . . . 343
Listing, Copying, and Moving Files . . . . . . . . . . . . . . . . . . . . . . . 343

The Command-Line Tools . . . . . . . . . . . . . . . . . . . . . . . . . 343
File Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Finding Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Using find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Using locate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Using Konqueror to Find Files. . . . . . . . . . . . . . . . . . . . . . . 351
Finding Files in GNOME . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Finding Files in mc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Looking at Files and File Types . . . . . . . . . . . . . . . . . . . . . . . . . 353
The file Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
strings, ghex2, khexedit, and antiword. . . . . . . . . . . . . . . . . . 354
Viewing and Opening Different File Types and Formats . . . . . . . . 355
Compressing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Working with Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Working with tar Archives . . . . . . . . . . . . . . . . . . . . . . . . . 364
Working with cpio Archives . . . . . . . . . . . . . . . . . . . . . . . . 366
Working with zip Archives . . . . . . . . . . . . . . . . . . . . . . . . . 367
Unpacking RPM Packages . . . . . . . . . . . . . . . . . . . . . . . . . 367
Using pax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Using ark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Files Attributes and ACLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
File Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
File ACLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Chapter 14: Working with the System . . . . . . . . . . . . . . . . . . 373
System Rescue and Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Booting from the Hard Disk with Special Boot Parameters . . . . . . 374
Booting into the Rescue System . . . . . . . . . . . . . . . . . . . . . 374
Booting into YaST System Repair Mode . . . . . . . . . . . . . . . . . 375
Working with Partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Partitioning Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

Making a Filesystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Working with DVDs, CDs, and Floppies . . . . . . . . . . . . . . . . . . . . . 385
Creating and Using Images of Existing Disks . . . . . . . . . . . . . . 385
Creating and Using New Disk Images . . . . . . . . . . . . . . . . . . . 387
Creating ISO CD and DVD Images . . . . . . . . . . . . . . . . . . . . . 388
03_754889 ftoc.qxp 12/27/05 7:06 PM Page xxiv

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×