CompTIA Linux Complete Study Guide (Exams LX0-101 And

Transcription

CompTIALinux CompleteStudy Guide

CompTIALinux CompleteStudy Guide(Exams LX0-101 and LX0-102)Roderick W. Smith

Disclaimer: This eBook does not include ancillary media that was packaged with theprinted version of the book.Acquisitions Editor: Jeff KellumDevelopment Editors: Kim Wimpsett and Pete GaughanTechnical Editors: Emmett Dulaney and Evan BlomquistProduction Editor: Liz BrittenCopy Editor: Tiffany TaylorProduction Manager: Tim TateVice President and Executive Group Publisher: Richard SwadleyVice President and Publisher: Neil EddeAssistant Project Manager: Jenny SwisherAssociate Producer: Kit MaloneQuality Assurance: Angie DennyBook Designer: Judy Fung, Bill GibsonCompositor: Craig Johnson, Happenstance Type-O-RamaProofreader: Publication Services, Inc.Indexer: Ted LauxProject Coordinator, Cover: Lynsey StanfordCover Designer: Ryan SneedCopyright 2010 by Wiley Publishing, Inc., Indianapolis, IndianaPublished simultaneously in CanadaISBN: 978-0-470-88845-2No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by anymeans, 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, 222Rosewood 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 at http://www.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 be created or extendedby 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, orother professional services. If professional assistance is required, the services of a competent professional personshould be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact thatan organization or Web site is referred to in this work as a citation and/or a potential source of further informationdoes not mean that the author or the publisher endorses the information the organization or Web site may provideor recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work mayhave 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 ourCustomer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317)572-4002.Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not beavailable in electronic books.Library of Congress Cataloging-in-Publication DataSmith, Roderick W.CompTIA Linux study guide : exams LX0-101 and LX0-102 / Roderick W. Smith.—1st ed.p. cm.ISBN-13: 978-0-470-88845-2 (pbk.)ISBN-10: 0-470-88845-8 (pbk.)ISBN 978-0-470-91307-9 (ebk)ISBN 978-0-470-91305-5 (ebk)ISBN 978-0-470-91306-2 (ebk)1. Electronic data processing personnel—Certification. 2. Operating systems (Computers)—Examinations—Study guides. 3. Linux. I. Title.QA76.3.S47652 2010005.4’32—dc222010016921TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of JohnWiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used withoutwritten permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is notassociated with any product or vendor mentioned in this book.10 9 8 7 6 5 4 3 2 1

Dear Reader,Thank you for choosing CompTIA Linux Complete Study Guide (Exams LX0-101 andLX0-102). This book is part of a family of premium-quality Sybex books, all of which arewritten by outstanding authors who combine practical experience with a gift for teaching.Sybex was founded in 1976. More than thirty years later, we’re still committed to producingconsistently exceptional books. With each of our titles we’re working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal isto bring you the best books available.I hope you see all that reflected in these pages. I’d be very interested to hear your commentsand get your feedback on how we’re doing. Feel free to let me know what you think aboutthis or any other Sybex book by sending me an email at nedde@wiley.com, or if you thinkyou’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 EddeVice President and PublisherSybex, an Imprint of Wiley

From one writer to another: Lola, keep writing your stories!

AcknowledgmentsAlthough this book bears my name as author, many other people contributed to its creation.Without their help, this book wouldn’t exist, or at best would exist in a lesser form. JeffKellum was the Acquisitions Editor, and so helped get the book started. Pete Gaughan, theDevelopment Editor, and Liz Britten, the Production Editor, oversaw the book as it progressedthrough all its stages. Emmett Dulaney was the Technical Editor, who checked the text fortechnical errors and omissions—but any mistakes that remain are my own. Tiffany Taylor,the copy editor, helped keep the text grammatical and understandable. The proofreader,Publications Services, Inc., checked the text for typos. I’d also like to thank Neil Salkind andothers at Studio B, who helped connect me with Wiley to write this book.About the AuthorRoderick W. Smith is a Linux consultant and author. He has written over a dozenbooks on Linux, FreeBSD, and computer networking, including the LPIC-1 StudyGuide and Linux Administrator Street Smarts (both from Sybex). He can be reachedat rodsmith@rodsbooks.com.

Contents at a GlanceIntroductionxxiAssessment TestxlviiPart IThe CompTIA Linux LX0-101 Exam1Chapter 1Exploring Linux Command-Line Tools3Chapter 2Managing SoftwareChapter 3Configuring Hardware105Chapter 4Managing Files177Chapter 5Booting Linux and Editing Files225Part IIThe CompTIA Linux LX0-102 ExamChapter 6Configuring the X Window System, Localization,and Printing267Chapter 7Administering the System329Chapter 8Configuring Basic Networking383Chapter 9Writing Scripts, Configuring E-Mail, and Using Databases427Chapter 10Securing Your System475AppendixAbout the Companion CD51945265Glossary523Index551

ContentsIntroductionxxiAssessment TestPart IChapterChapter12xlviiThe CompTIA Linux LX0-101 Exam1Exploring Linux Command-Line Tools3Understanding Command-Line BasicsExploring Your Linux Shell OptionsUsing a ShellExploring Shell ConfigurationUsing Environment VariablesGetting HelpUsing Streams, Redirection, and PipesExploring Types of StreamsRedirecting Input and OutputPiping Data Between ProgramsGenerating Command LinesProcessing Text Using FiltersFile-Combining CommandsFile-Transforming CommandsFile-Formatting CommandsFile-Viewing CommandsFile-Summarizing CommandsUsing Regular ExpressionsUnderstanding Regular ExpressionsUsing grepUsing sedSummaryExam EssentialsReview QuestionsAnswers to Review 373842Managing Software45Package ConceptsUsing RPMRPM Distributions and ConventionsThe rpm Command SetExtracting Data from RPMsUsing YumRPM and Yum Configuration FilesRPM Compared to Other Package Formats4648485054555960

xiiContentsUsing Debian PackagesDebian Distributions and ConventionsThe dpkg Command SetUsing apt-cacheUsing apt-getUsing dselect, aptitude, and SynapticReconfiguring PackagesDebian Packages Compared to Other Package FormatsConfiguring Debian Package ToolsConverting Between Package FormatsPackage Dependencies and ConflictsReal and Imagined Package Dependency ProblemsWorkarounds to Package Dependency ProblemsStartup Script ProblemsManaging Shared LibrariesLibrary PrinciplesLocating Library FilesLibrary Management CommandsManaging ProcessesUnderstanding the Kernel: The First ProcessExamining Process ListsUnderstanding Foreground and Background ProcessesManaging Process PrioritiesKilling ProcessesSummaryExam EssentialsReview QuestionsAnswers to Review 083858585919293949597101Configuring Hardware105Configuring the BIOS and Core HardwareUnderstanding the Role of the BIOSIRQsI/O AddressesDMA AddressesBoot Disks and Geometry SettingsColdplug and Hotplug DevicesConfiguring Expansion CardsConfiguring PCI CardsLearning about Kernel ModulesLoading Kernel ModulesRemoving Kernel Modules106107109112113113115117117119120122

ContentsChapter4xiiiConfiguring USB DevicesUSB BasicsLinux USB DriversUSB Manager ApplicationsConfiguring Hard DisksConfiguring PATA DisksConfiguring SATA DisksConfiguring SCSI DisksConfiguring External DisksDesigning a Hard Disk LayoutWhy Partition?Understanding Partitioning SystemsAn Alternative to Partitions: LVMMount PointsCommon Partitions and Filesystem LayoutsCreating Partitions and FilesystemsPartitioning a DiskPreparing a Partition for UseMaintaining Filesystem HealthTuning FilesystemsMaintaining a JournalChecking FilesystemsMonitoring Disk UseMounting and Unmounting FilesystemsTemporarily Mounting or Unmounting FilesystemsPermanently Mounting FilesystemsSummaryExam EssentialsReview QuestionsAnswers to Review anaging Files177Managing FilesFile Naming and Wildcard Expansion RulesFile CommandsFile Archiving CommandsManaging LinksDirectory CommandsManaging File OwnershipAssessing File OwnershipChanging a File’s OwnerChanging a File’s Group178178180185191192193194194195

xivChapterContents5Controlling Access to FilesUnderstanding PermissionsChanging a File’s ModeSetting the Default Mode and GroupChanging File AttributesManaging Disk QuotasEnabling Quota SupportSetting Quotas for UsersLocating FilesThe FHSTools for Locating FilesSummaryExam EssentialsReview QuestionsAnswers to Review 8222Booting Linux and Editing Files225Installing Boot LoadersBoot Loader PrinciplesUsing LILO as the Boot LoaderUsing GRUB as the Boot LoaderUnderstanding the Boot ProcessExtracting Information about the Boot ProcessLocating and Interpreting Boot MessagesThe Boot ProcessDealing with Runlevels and the Initialization ProcessRunlevel FunctionsIdentifying the Services in a RunlevelManaging Runlevel ServicesChecking Your RunlevelChanging Runlevels on a Running SystemEditing Files with ViUnderstanding Vi ModesExploring Basic Text-Editing ProceduresSaving ChangesSummaryExam EssentialsReview QuestionsAnswers to Review 7250251251254255255257261

ContentsPART IIChapter6xvThe CompTIA Linux LX0-102 Exam265Configuring the X Window System,Localization, and Printing267Configuring Basic X FeaturesX Server Options for LinuxMethods of Configuring XX Configuration OptionsObtaining X Display InformationConfiguring X FontsFont Technologies and FormatsConfiguring X Core FontsConfiguring a Font ServerConfiguring Xft FontsManaging GUI LoginsThe X GUI Login SystemRunning an XDMCP ServerConfiguring an XDMCP ServerUsing X for Remote AccessX Client/Server PrinciplesUsing Remote X ClientsX AccessibilityKeyboard and Mouse Accessibility IssuesScreen Display SettingsUsing Additional Assistive TechnologiesConfiguring Localization and InternationalizationSetting Your Time ZoneQuerying and Setting Your LocaleConfiguring PrintingConceptualizing the Linux Printing ArchitectureUnderstanding PostScript and GhostscriptRunning a Printing SystemConfiguring CUPSMonitoring and Controlling the Print QueueSummaryExam EssentialsReview QuestionsAnswers to Review 18318320325

xviChapterChapterContents78Administering the System329Managing Users and GroupsUnderstanding Users and GroupsConfiguring User AccountsConfiguring GroupsTuning User and System EnvironmentsUsing System Log FilesUnderstanding syslogdSetting Logging OptionsManually Logging DataRotating Log FilesReviewing Log File ContentsMaintaining the System TimeLinux Time ConceptsManually Setting the TimeUsing NTPRunning Jobs in the FutureUnderstanding the Role of cronCreating System cron JobsCreating User cron JobsUsing atSummaryExam EssentialsReview QuestionsAnswers to Review 9360366366367368372374374376380Configuring Basic Networking383Understanding TCP/IP NetworkingKnowing the Basic Functions of Network HardwareInvestigating Types of Network HardwareUnderstanding Network PacketsUnderstanding Network Protocol StacksKnowing TCP/IP Protocol TypesUnderstanding Network AddressingUsing Network AddressesResolving HostnamesNetwork PortsConfiguring Linux for a Local NetworkNetwork Hardware ConfigurationConfiguring with DHCPConfiguring with a Static IP Address384384385387387389390391397399402402402404

ContentsConfiguring RoutingUsing GUI Configuration ToolsUsing the ifup and ifdown CommandsConfiguring HostnamesDiagnosing Network ConnectionsTesting Basic ConnectivityTracing a RouteChecking Network StatusExamining Raw Network TrafficUsing Additional ToolsSummaryExam EssentialsReview QuestionsAnswers to Review 6418418420424Writing Scripts, Configuring E-mail,and Using Databases427Managing the Shell EnvironmentReviewing Environment VariablesUnderstanding Common Environment VariablesUsing AliasesModifying Shell Configuration FilesWriting ScriptsBeginning a Shell ScriptUsing CommandsUsing VariablesUsing Conditional ExpressionsUsing LoopsUsing FunctionsManaging E‑mailUnderstanding E‑mailChoosing E‑mail SoftwareManaging E‑mailSecuring Your E-mail ServerManaging Data with SQLPicking a SQL PackageUnderstanding SQL BasicsUsing MySQLSummaryExam EssentialsReview QuestionsAnswers to Review 6448450454455455456457465466468472

xviiiContentsChapterAppendix10Securing Your System475Administering Network SecurityUsing Super Server RestrictionsDisabling Unused ServersAdministering Local SecuritySecuring PasswordsLimiting root AccessSetting Login, Process, and Memory LimitsLocating SUID/SGID FilesConfiguring SSHSSH BasicsSetting SSH Options for Your SystemSSH Security ConsiderationsUsing GPGGenerating and Importing KeysEncrypting and Decrypting DataSigning Messages and Verifying SignaturesSummaryExam EssentialsReview QuestionsAnswers to Review 8509510510511512516About the Companion CD519What You’ll Find on the CDSybex Test EngineElectronic FlashcardsPDF of the BookAdobe ReaderSystem RequirementsWindowsLinuxUsing the CDTroubleshootingCustomer 523551

Table of ExercisesExercise1.1Editing Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Exercise2.1Managing Packages Using RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Exercise2.2Managing Debian Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Exercise3.1Creating Filesystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Exercise4.1Modifying Ownership and Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . 202Exercise4.2Locating Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Exercise5.1Changing Runlevels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Exercise6.1Changing the X Resolution and Color Depth . . . . . . . . . . . . . . . . . . . . . . 280Exercise7.1Creating User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337Exercise7.2Creating User cron Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370Exercise8.1Configuring a Network Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409Exercise9.1Changing Your bash Prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432Exercise9.2Creating a Simple Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445Exercise9.3Creating a SQL Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461Exercise10.1Monitor Network Port Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

IntroductionWhy should you learn about Linux? It’s a fast-growing operating system, and it is inexpensive and flexible. Linux is also a major player in the small and mid-sized server field, and it’san increasingly viable platform for workstation and desktop use as well. By understandingLinux, you’ll increase your standing in the job market. Even if you already know Windowsor Mac OS and your employer uses these systems exclusively, understanding Linux will giveyou an edge when you’re looking for a new job or if you’re looking for a promotion. Forinstance, this knowledge will help you to make an informed decision about if and when youshould deploy Linux.The Computing Technology Industry Association (CompTIA) promotes the Linux exam as an introductory certification for people who want to enter careers involving Linux.The exam is meant to certify that an individual has the skills necessary to install, operate,and troubleshoot a Linux system and is familiar with Linux-specific concepts and basichardware.The purpose of this book is to help you pass the 2010 version of the Linux exams(LX0-101 and LX0-102). Because these exams cover basic Linux installation, configuration, maintenance, applications, networking, and security, those are the topics that areemphasized in this book. You’ll learn enough to get a Linux system up and running andhow to configure it for many common tasks. Even after you’ve taken and passed the Linux exam, this book should remain a useful reference.In 2010, CompTIA announced a partnership with Linux Professional Institute,the organization behind the popular LPI Certification (LPIC) program . Withthis partnership, CompTIA will be offering the LPIC Level 1 exams underthe Linux umbrella . The exams and the exam objectives are identical for thetwo programs . However, Linux candidates have the option of receiving theirLPIC-1 as well as the Novell Certified Linux Administrator certification bypassing the CompTIA Linux exams .This book has undergone its own testing and certification by ProCert Labs (http://www.procertcom.com), and has achieved the CompTIA Authorized Quality Curriculum (CACQ)status. This means that you can rest assured that the book covers the Linux objectives.What Is Linux?Linux is a clone of the Unix operating system (OS) that has been popular in academia andmany business environments for years. Formerly used exclusively on large mainframes, Unixand Linux can now run on small computers—which are actually far more powerful than themainframes of just a few years ago. Because of its mainframe heritage, Unix (and hence alsoLinux) scales well to perform today’s demanding scientific, engineering, and network servertasks.

xxiiIntroductionLinux consists of a kernel, which is the core control software, and many libraries andutilities that rely on the kernel to provide features with which users interact. The OS isavailable in many different distributions, which are collections of a specific kernel with specific support programs.Why Become Linux Certified?There are several good reasons to get your Linux certification:Provides proof of professional achievement    Certifications are quickly becoming statussymbols in the computer service industry. Organizations, including members of the computerservice industry, are recognizing the benefits of certification, such as Linux . Organizationsare pushing for their members to become certified. Every day, more people are putting theCompTIA official certification logo on their business cards.Increases your marketability    Linux certification makes individuals more marketable topotential employers. Also, Linux certified employees might receive a higher salary basebecause employers won’t have to spend as much money on vendor-specific training.Provides an opportunity for advancement    Most raises and advancements are based onperformance. Linux certified employees work faster and more efficiently. The more productive employees are, the more money they will make for their company; and, of course,the more money they make for the company, the more valuable they will be to the company.So, if employees are Linux certified, their chances of getting promoted will be greater.Fulfills training requirements    Each year, more and more major computer hardware vendors,including (but not limited to) IBM, Hewlett-Packard, and Novell, are recognizing CompTIA’scertifications as prerequisites in their own respective certification programs. The use of outside certifications like Linux has the side benefit of reducing training costs for employers.Because more and more small companies are deploying the flexible and inexpensive OS wecall Linux, the demand for experienced users is growing. CompTIA anticipates that theLinux certification, like the A certification, will find itself integrated into various certification programs as well.Raises customer confidence    As the IT community, users, small business owners, and thelike become more familiar with the Linux certified professional moniker, more of themwill realize that the Linux professional is more qualified to work in their Linux environment than is a noncertified individual.How to Become Linux CertifiedThe Linux certification is available to anyone who passes the two required exams: LX0-101and LX0-102. You don’t have to work for a particular company. It’s not a secret society.The exam is administered by Thomson Prometric and Pearson VUE. The exam can betaken at any Thomson Prometric or Pearson VUE testing center. If you pass, you will get acertificate in the mail from CompTIA saying that you have passed, and you will also receive

Introductionxxiiia lapel pin and business cards. To fi nd the Thomson Prometric testing center nearest you,call (800) 755-EXAM (755-3926). Contact (877) 551-PLUS (551-7587) for Pearson VUEinformation.To register for the exam with Thomson Prometric, call (800) 776-MICRO (776-4276),or register online at http://securereg3.prometric.com. To register with Pearson VUE,call (877) 551-PLUS (551-7587), or register online at http://www.vue.com/comptia. However you do it, you’ll be asked for your name, mailing address, phone number, employer,when and where you want to take the test (i.e., which testing center), and your credit cardnumber (arrangement for payment must be made at the time of registration).As noted above, if you pass the CompTIA Linux exams, you do have theoption of also obtaining your LPIC-1 certification from LPI, as well as yourNovell Certified Linux Administrator (CLA) certification at the same time .All that is required is authorization to submit your information to LPI . Youare given this option at the testing site .Who Should Buy This BookAnybody who wants to pass the Linux exams may benefit from this book. If you’re newto Linux, this book covers the material you will need to learn the OS from the beginning,and it continues to provide the knowledge you need up to a proficiency level sufficient topass the LX0-101 and LX0-102 exams. You can pick up this book and learn from it even ifyou’ve never used Linux before, although you’ll fi nd it an easier read if you’ve at least casually used Linux for a few days. If you’re already familiar with Linux, this book can serve asa review and as a refresher course for information with which you might not be completelyfamiliar. In either case, reading this book will help you to pass the Linux exams.This book is written with the assumption that you know at least a little bit about Linux(what it is, and possibly a few Linux commands). I also assume that you know some basicsabout computers in general, such as how to use a keyboard, how to insert a disc into a CDROM drive, and so on. Chances are, you have used computers in a substantial way in thepast—perhaps even Linux, as an ordinary user, or maybe you have used Windows or MacOS. I do not assume that you have extensive knowledge of Linux system administration,but if you’ve done some system administration, you can still use this book to fi ll in gaps inyour knowledge.As a practical matter, you’ll need a Linux system with which to practice andlearn in a hands-on way . Neither the exams nor this book covers actually installing Linux on a computer from scratch, although some of the prerequisites (suchas disk partitioning) are covered . You may need to refer to your distribution’sdocumentation to learn how to accomplish this task . Alternatively, severalvendors now sell computers with Linux pre-installed .

xxivIntroductionHow This Book Is OrganizedThis book consists of 10 chapters plus supplementary information: a glossary, this introduction, and the assessment test after the introduction. The chapters are organized asfollows:NNNNNNNNNNNNNNNNNNNNChapter 1, “Exploring Linux Command-Line Tools,” covers the basic tools you needto interact with Linux. These include shells, redirection, pipes, text filters, and regularexpressions.Chapter 2, “Managing Software,” describes the programs you’ll use to manage software. Much of this task is centered around the RPM and Debian package managementsystems. The chapter also covers handling shared libraries and managing processes(that is, running programs).Chapter 3, “Configuring Hardware,” focuses on Linux’s interactions with the hardware on which it runs. Specific hardware and procedures for using it include the BIOS,expansion cards, USB devices, hard disks, and the partitions and filesystems used onhard disks.Chapter 4, “Managing Files,” covers the tools used to manage files. This includescommands to manage files, ownership, and permissions, as well as Linux’s standarddirectory tree and tools for archiving files.Chapter 5, “Booting Linux and Editing Files,” explains how Linux boots up and howyou can edit files in Linux. Specific topics include the LILO and GRUB boot loaders,boot diagnostics, runlevels, and the Vi editor.Chapter 6, “Configuring the X Window System, Localization, and Printing,” describesthe Linux GUI and printing subsystems. Topics include X configuration, managing GUIlogins, configuring location-specific features, enabling accessibility features, and settingup Linux to use a printer.Chapter 7, “Administering the System,” describes miscellaneous administrative tasks.These include user and group management, tuning user environments, managing logfiles, setting the clock, and running jobs in the future.Chapter 8, “Configuring Basic Networking,” focuses on basic network configuration.Topics include TCP/IP basics, setting up Linux on a TCP/IP network, and networkdiagnostics.Chapter 9, “Writing Scripts, Configuring E-mail, and Using Databases,” covers thesemiscellaneous topics. Scripts are small programs that administrators often use to helpautomate common tasks. E‑mail, of course, is an important topic for any computeruser, particularly on Linux, which often runs an e‑mail server for local or remote use.Linux can run databases that help you store and retrieve information, and these toolscan be very important ones on many Linux systems.Chapter 10, “Securing Your System,” covers security. Specific subjects include networksecurity, local security, and the use of encryption to improve security.

IntroductionxxvChapters 1 through 5 cover the LX0-101 exam, while chapters 6 through 10 cover theLX0-102 exam. These make up Part I and Part II of the book, respectively.Each chapter begins with a list of the Linux objectives that are covered in that chapter.The book doesn’t cover the objectives in order. Thus, you shouldn’t be alarmed at some ofthe odd ordering of the objectives within the book. At the end of each chapter, you’ll fi nd acouple of elements you can use to prepare for the exam:Exam Essentials This section summarizes important information that was covered inthe chapter. You should be able to perform each of the tasks or convey the informationrequested.Review Questions Each chapter concludes with 20 review questions. You should answerthese questions and check your answers against the ones provided after the questions. Ifyou can’t answer at least 80 percent of these questions correctly, go back and review thechapter, or at least those sections that seem to be giving you difficulty.The review questions

Contents at a Glance Introduction xxi Assessment Test xlvii Part I The CompTIA Linux LX0-101 Exam 1 Chapter 1 Exploring Linux Command-Line Tools 3 Chapter 2 Managing Software 45 Chapter 3 Configuring Hardware 105 Chapter 4 Managing Files 177 Chapter 5 Booting Linux and Editing Files 225 Par