ffirs. indd ii 11/12/10 12:25 PMLPIC-1Linux Professional InstituteCertificationStudy GuideThird Editionffirs. indd i 11/12/10 12:25 PMffirs. indd ii 11/12/10 12:25 PMLPIC-1Linux Professional InstituteCertificationStudy GuideThird EditionRoderick W. SmithJohn Wiley & Sons, Inc.ffirs. indd iii 11/12/10 12:25 PMSenior Acquisitions Editor: Jeff KellumDevelopment Editor: Alexa MurphyTechnical Editors: Ross Brunson and Kevin Glendenning, FOSSter.comProduction Editor: Eric CharbonneauCopy Editor: Kim WimpsettEditorial Manager: Pete GaughanProduction Manager: Tim TateVice President and Executive Group Publisher: Richard SwadleyVice President and Publisher: Neil EddeMedia Project Manager 1: Laura Moss-HollisterMedia Associate Producer: Doug KuhnMedia Quality Assurance: Josh FrankBook Designer: Judy FungProofreader: Candace CunninghamIndexer: Ted LauxProject Coordinator, Cover: Katherine CrockerCover Designer: Ryan SneedCopyright © John Wiley & Sons by 2013, Inc., Indianapolis, IndianaPublished simultaneously in CanadaISBN: 978-1-118-49563-6ISBN: 978-1-118-52648-4 (ebk).ISBN: 978-1-118-57047-0 (ebk).ISBN: 978-1-118-57055-5 (ebk).No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permittedunder Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permissionof the Publisher, or authorization through payment of the appropriate per-copy fee to the CopyrightClearance 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 Permissions Department, John Wiley &Sons, Inc., 111 River Street, Hoboken, NJ 07030 (201) 748-6011, fax (201) 748-6008, or online atwww.wiley.com/go/permissions.Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warrantieswith 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 becreated or extended by sales or promotional materials. The advice and strategies contained herein may notbe suitable for every situation. This work is sold with the understanding that the publisher is not engaged inrendering legal, accounting, or other professional services. If professional assistance is required, the servicesof a competent professional person should be sought. Neither the publisher nor the author shall be liable fordamages arising herefrom. The fact that an organization or Web site is referred to in this work as a citationand/or a potential source of further information does not mean that the author or the publisher endorsesthe information the organization or Web site may provide or recommendations it may make. Further,readers should be aware that Internet Web sites listed in this work may have changed or disappearedbetween 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 contactour Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 orfax (317) 572-4002.Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some materialincluded with standard print versions of this book may not be included in e-books or in print-on-demand.If this book refers to media such as a CD or DVD that is not included in the version you purchased, youmay download this material at http://booksupport.wiley.com. For more information about Wileyproducts, visit www.wiley.com.Library of Congress Control Number: 2,012,951,869TRADEMARKS: Wiley, the Wiley logo, and the logo are trademarks or registered trademarks Sybex ofJohn Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be usedwithout written permission. All other trademarks are the property of their respective owners. John Wiley &Sons, Inc., is not associated with any product or vendor mentioned in this book.10 9 8 7 6 5 4 3 2 1ffirs. indd iv 11/12/10 12:25 PMDear Reader,Thank you for choosing LPIC-1: Linux Professional Institute Certifi cation Study Guide,Third Edition. This book is part of a family of premium-quality Sybex books, all of whichare written by outstanding authors who combine practical experience with a gift forteaching.Sybex was founded in 1976. More than 30 years later, we're still committed to producingconsistently exceptional books. With each of our titles, we're working hard to set a newstandard for the industry. From the paper we print on to the authors we work with, ourgoal is to bring you the best books available.I hope you see all that refl ected in these pages. I'd be very interested to hear yourcomments and get your feedback on how we're doing. Feel free to let me know what youthink about this or any other Sybex book by sending me an email at nedde@wiley.com. If youthink you've found a technical error in this book, please visit http://sybex.custhelp.com.Customer feedback is critical to our efforts at Sybex. Best regards, Neil Edde Vice President and Publisher Sybex, an Imprint of Wileyffirs. indd v 11/12/10 12:25 PMffirs. indd vi 11/12/10 12:25 PMAcknowledgmentsAlthough this book bears my name as author, many other people contributed to itscreation. Without their help, this book wouldn't exist, or at best would exist in a lesserform. Jeff Kellum was the acquisitions editor and so helped get the book started. AlexaMurphy, the developmental editor, and Eric Charbonneau, the production editor, oversawthe book as it progressed through all its stages. Ross Brunson and Kevin Glendenningwere the technical editors who checked the text for technical errors and omissions — butany mistakes that remain are my own. Kim Wimpsett, the copy editor, helped keep thetext grammatical and understandable. The proofreader, Candace Cunningham, checkedthe text for typos. I'd also like to thank Neil Salkind and others at Studio B, who helpedconnect me with Wiley to write this book.ffirs. indd vii 11/12/10 12:25 PMffirs. indd viii 11/12/10 12:25 PMAbout the AuthorRoderick w. Smith is a Linux consultant and author. He has written more than 20 bookson Linux, FreeBSD, and computer networking, including Linux Essentials, the LPIC-2Study Guide, and Linux Administrator Street Smarts (all from Sybex). He can be reachedat rodsmith@rodsbooks.com.ffirs. indd ix 11/12/10 12:25 PMffirs. indd x 11/12/10 12:25 PMContents at a GlanceIntroduction xxiiiExam Objectives xxix -101 Exam Objectives xxix 102-Exam Objectives xxxvAssessment Test xliAnswers to the Assessment Test xlviiiPart I Exam 101 1Chapter 1 Exploring Linux command-line Tools 3Chapter 2 Managing Software 45Chapter 3 Configuring Hardware 105Chapter 4 Managing Files 175Chapter 5 Booting Linux and Editing Files 223Part II Exam 102 265Chapter 6 Configuring the X Window System,Localization, and Printing 267Chapter 7 Administering the System 329Chapter 8 Configuring Basic Networking 381Chapter 9 Writing Scripts, Configuring Email, and Using Databases 425Chapter 10 Securing Your System 473Appendix A the Answers to Review Questions 517Appendix B About the Additional Study Tools 553Index 557ffirs. indd xi 11/12/10 12:25 PMffirs. indd xii 11/12/10 12:25 PMContentsIntroduction xxiiiExam Objectives xxix -101 Exam Objectives xxix 102-Exam Objectives xxxvAssessment Test xliAnswers to the Assessment Test xlviiiPart I Exam 101 1Chapter 1 Exploring Linux command-line Tools 3Understanding the Command-Line Basics 4Exploring Your Linux Shell Options 4Using a Shell 5Exploring Shell Configuration 12Using Environment Variables 12Getting Help 13Using Streams, Redirection, and Pipes 14Exploring Types of Streams 15Redirecting Input and Output 15Piping Data Between Programs 17Generating Command Lines 18Processing Text Using Filters 19File-Combining Commands 19File-Transforming Commands 21File-Formatting Commands 25File-Viewing Commands 28File-Summarizing Commands 30Using Regular Expressions 32Understanding Regular Expressions 32Using grep 33Using sed 35Summary 37Exam Essentials 38Review Questions 39ftoc. indd xiii 11/12/10 12:26 PMXIV ContentsChapter 2 Managing Software 45Package Concepts 46Using RPM 48RPM Distributions and Conventions 48The rpm Command Set 51Extracting Data from 54 RPMsUsing Yum 55Rpm and Yum Configuration Files 59RPM Compared to Other Package Formats 60Using Debian Packages 61Debian Distributions and Conventions 61The dpkg Command Set 62Using apt-cache 65Using apt-get 65Using dselect, aptitude, Synaptic and 69Reconfiguring Packages 71Debian Packages Compared to Other Package Formats 71Configuring Debian Package Tools 72Converting Between Package Formats 73Package Dependencies and Conflicts 75Real and Imagined Package Dependency Problems 75Workarounds for Package Dependency Problems 76Startup Script Problems 78Managing Shared Libraries 79Library Principles 79Locating Library Files 81Library Management Commands 83Managing Processes 85Understanding the Linux Kernel: The First Process 85Examining Process Lists 86Understanding the Foreground and BackgroundProcesses 92Managing Process Priorities 93Killing Processes 94Summary 96Exam Essentials 96Review Questions 98Chapter 3 Configuring Hardware 105Configuring the Core Hardware and Firmware 106Understanding the Role of the Firmware 106IRQs 110I/O Addresses 113DMA Addresses 114ftoc. indd xiv 11/12/10 12:26 PMContents xvBoot Disks and Geometry Settings, 114Coldplug and Hotplug Devices 117Configuring Expansion Cards 118Configuring PCI Cards 118Learning about Kernel Modules 120Loading Kernel Modules 121Removing Kernel Modules 123Co
đang được dịch, vui lòng đợi..