100% ““TThhee uullttiimmaattee rreeffeerreennccee gguuiiddee ttoo LLPPII LLeevveell 11 cceerrttiiffiiccaattiioonn,, The only guide you need for LPIC 1 exam success . . . 100% ppaacckkeedd wwiitthh uusseeffuull ttiippss aanndd sseellff--aasssseessssmmeenntt ffeeaattuurreess..”” You’re holding in your hands the most comprehensive and effective guide available for the Linux Professional ——TTiimm SSoossbbee,, EEddiittoorriiaall DDiirreeccttoorr,, CCeerrttiiffiiccaattiioonn MMaaggaazziinnee Institute Certification 1 exams. Veteran Linux administrators Jason and Angie Nash deliver incisive, crystal-clear C O M P R E H E N S I V E ONE HUNDRED PERCENT COMPREHENSIVE explanations of every topic covered, highlighting exam-critical concepts and offering hands-on tips that can help Covers LPI exams AUTHORITATIVE you in your real-world IT career. Throughout, they provide pre-tests, exam-style assessment questions, scenario 101 and 102 WHAT YOU NEED problems, and computer-based lab exercises—everything you need to master the material and pass the exams. ONE HUNDRED PERCENT LL Get complete coverage of the LPIC 1 Master the material exam objectives as you learn the ins for Linux Professional and outs of: Institute exams 101 • Administering the system • Using the shell PP and 102 • Installing software • Processing text Test your knowledge • Managing network services • Using shells and scripts with assessment • Using documentation • Using X questions, scenarios, Learn to set up II and labs • Managing users and groups • Installing Linux graphical window managers • Working with the kernel • Printing CC Practice on state- of-the-art test- • Networking fundamentals • Managing security (cid:2) Labs include complete installation instructions preparation software • Understanding the boot process • Managing files for Red Hat and Debian LLPPIICC 11 • Using partitions and file systems About the Authors 11 Angie Nashis IT Consultant for her own firm, Tarheel Solutions. Test-Prep Material on CD-ROM She has her LPIC 1 certification and works primarily with Linux and Microsoft operating systems to provide solutions for small • Hungry Minds test engine powered by top-rated Boson Software businesses. • Linux FAQs and HOWTOs for exam preparation Jason Nashis a LPIC 1–certified independent consultant experi- NASH enced with Linux, Solaris, and several BSD variants. He has written • A searchable e-version of the book several books for the Microsoft world, but now spends most of his NASH time in Linux and BSD. Certification Linux Professional Institute, www.lpi.org Bible System Requirements: PCwith a Pentium $59.99USA Reader Level: Shelving Category: processor running at 90 MHz or faster; 20MB+ $89.99 Canada Beginning to Advanced Certification/Linux RAM; CD-ROM drive £44.99 UK incl. VAT Test-prep ISBN 0-7645-4772-0 material on Hungry Minds w w w. h u n g r y m i n d s . c o m CD-ROM *85555-AFDHHj ,!7IA7G4-fehhca!:p;p;T;T;t Test Engine powered by Angie Nash and Jason Nash 4772-0 FM.F 5/14/01 4:20 PM Page i LPIC 1 Certification Bible 4772-0 FM.F 5/14/01 4:20 PM Page ii 4772-0 FM.F 5/14/01 4:20 PM Page iii LPIC 1 Certification Bible Angie Nash and Jason Nash Best-Selling Books • Digital Downloads • e-Books • Answer Networks • e-Newsletters • Branded Web Sites • e-Learning Indianapolis, IN ✦Cleveland, OH ✦New York, NY 4772-0 FM.F 5/14/01 4:20 PM Page iv LPIC 1 Certification Bible Philippines; by Contemporanea de Ediciones for Published by Venezuela; by Express Computer Distributors for the Hungry Minds, Inc. Caribbean and West Indies; by Micronesia Media 909 Third Avenue Distributor, Inc. for Micronesia; by Chips New York, NY 10022 Computadoras S.A. de C.V. for Mexico; by Editorial www.hungryminds.com Norma de Panama S.A. for Panama; by American Copyright 2001 Hungry Minds, Inc. All rights Bookshops for Finland. reserved. No part of this book, including interior For general information on Hungry Minds’ products design, cover design, and icons, may be reproduced and services please contact our Customer Care or transmitted in any form, by any means (electronic, department within the U.S. at 800-762-2974, outside photocopying, recording, or otherwise) without the the U.S. at 317-572-3993 or fax 317-572-4002. prior written permission of the publisher. For sales inquiries and reseller information, including Library of Congress Control Number: 2001090743 discounts, premium and bulk quantity sales, and foreign-language translations, please contact our ISBN: 0-7645-4772-0 Customer Care department at 800-434-3422, fax Printed in the United States of America 317-572-4002 or write to Hungry Minds, Inc., Attn: 10 9 8 7 6 5 4 3 2 1 Customer Care Department, 10475 Crosspoint 1P/RY/QW/QR/IN Boulevard, Indianapolis, IN 46256. Distributed in the United States by Hungry Minds, For information on licensing foreign or domestic Inc. rights, please contact our Sub-Rights Customer Care department at 212-884-5000. Distributed by CDG Books Canada Inc. for Canada; by Transworld Publishers Limited in the United For information on using Hungry Minds’ products Kingdom; by IDG Norge Books for Norway; by IDG and services in the classroom or for ordering Sweden Books for Sweden; by IDG Books Australia examination copies, please contact our Educational Publishing Corporation Pty. Ltd. for Australia and Sales department at 800-434-2086 or fax 317-572-4005. New Zealand; by TransQuest Publishers Pte Ltd. for For press review copies, author interviews, or other Singapore, Malaysia, Thailand, Indonesia, and Hong publicity information, please contact our Public Kong; by Gotop Information Inc. for Taiwan; by ICG Relations department at 317-572-3168 or fax Muse, Inc. for Japan; by Intersoft for South Africa; by 317-572-4168. Eyrolles for France; by International Thomson For authorization to photocopy items for corporate, Publishing for Germany, Austria, and Switzerland; by personal, or educational use, please contact Distribuidora Cuspide for Argentina; by LR Copyright Clearance Center, 222 Rosewood Drive, International for Brazil; by Galileo Libros for Chile; by Danvers, MA 01923, or fax 978-750-4470. Ediciones ZETA S.C.R. Ltda. for Peru; by WS Computer Publishing Corporation, Inc., for the LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND AUTHOR HAVE USED THEIR BEST EFFORTS IN PREPARING THIS BOOK. THE PUBLISHER AND AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THERE ARE NO WARRANTIES WHICH EXTEND BEYOND THE DESCRIPTIONS CONTAINED IN THIS PARAGRAPH. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS. THE ACCURACY AND COMPLETENESS OF THE INFORMATION PROVIDED HEREIN AND THE OPINIONS STATED HEREIN ARE NOT GUARANTEED OR WARRANTED TO PRODUCE ANY PARTICULAR RESULTS, AND THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY INDIVIDUAL. NEITHER THE PUBLISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES. Linux Professional Institute and the LPIlogo are trademarks of Linux Professional Institute, Inc. The Linux Professional Institute does not endorse any third party exam preparation material or techniques. For further details please contact [email protected]. Trademarks:All trademarks are property of their respective owners. Hungry Minds, Inc. is not associated with any product or vendor mentioned in this book. is a trademark of Hungry Minds, Inc. 4772-0 FM.F 5/14/01 4:20 PM Page v About the Authors Angie Nashis an IT Consultant for her own firm, Tarheel Solutions. She works primarily with Linux and Microsoft operating systems to provide solutions for small businesses. Her free time is spent adding new products to her arsenal. She can be reached at [email protected]. Jason Nash is an independent consultant experienced with Linux, Solaris, and several BSD variants. He has written several books for the Microsoft world, but now spends most of his time in Linux and BSD. He can be reached at [email protected]. 4772-0 FM.F 5/14/01 4:20 PM Page vi Credits Acquisitions Editors Quality Control Technicians Nancy Maragioglio Andy Hollandbeck Katie Feltman Susan Moritz Carl Pierce Project Editors Charles Spencer Brian MacDonald Kevin Kent Permissions Editor Laura Moss Technical Editor Theresa Hadden-Martinez Media Development Specialist Megan Decraene Copy Editor Kevin Kent Media Development Coordinator Marisa Pearman Editoral Managers Ami Frank Sullivan Proofreading and Indexing Kyle Looper TECHBOOKS Production Services Project Coordinator Emily Wichlinski Graphics and Production Specialists Gabriele McCann Brian Torwelle 4772-0 FM.F 5/14/01 4:20 PM Page vii This book is dedicated to two women who have made a profound impact on both our lives. The unconditional love and support that we have received from Marie Ward and Melva Hamby are always with us. 4772-0 FM.F 5/14/01 4:20 PM Page viii 4772-0 FM.F 5/14/01 4:20 PM Page ix Preface W elcome to the LPIC 1 Certification Bible.This book is designed to help you prepare for the Linux Professional Institute Certification Level 1 exams 101 and 102. The Linux Professional Institute is a distribution-independent, nonprofit organization. The exams are developed to certify an individual’s expertise with Linux systems. Level 1 certification is based upon many general tasks involving Linux systems. This book provides all the information you need to perform these tasks. Because of this, the book is useful as a study guide as well as a general Linux reference. We believe that this book will prove to be a useful tool when preparing for the LPIC exams and that you will want to keep it nearby as a handy resource while working with Linux systems. How This Book Is Organized This book is organized into four major parts, followed by several appendixes, a robust glossary, an index, and a compact disc. Here’s what you’ll find in this book: Part I: Installing Linux and Getting Started Part I presents basic information about Linux. It covers the basic installation and configuration of the Linux operating system. This part introduces the shell environ- ment and its usage. Finally, this part covers software installation, including the packaging systems used on Debian and Red Hat distributions. Part II: Getting Around in Linux Part II covers the basics of using Linux. This part explains many of the text process- ing tools available for Linux. Information on working with Linux partitions and file systems is also covered in this section. Another task required to get around in Linux is managing files and directories. This part introduces the commands most often used for this task. The documentation resources available to aid with the proper use of these commands and many of the tasks required on Linux are also covered here. Part II also explores the boot process, detailing the use of various configuration files and run levels. Finally, this part explores XFree86, the graphical user interface available for Linux.