LPI currently organizes its Linux Professional Institute Certification LPIC series in two levels: LPIC Levels 1 and 2.Each level consists of two exams that are priced at about U.S.. http
Trang 1By Jeff Dean, Bruno Gomes Pessanha,Nicolai Langfeldt, Steven Pritchard, James Stanger
Publisher: O'Reilly Pub Date: July 2006 Print ISBN-10: 0-596-00528-8 Print ISBN-13: 978-0-59-600528-3 Pages: 978
Trang 2network services such as email and the Web The second edition of LPI Linux
Certification in a Nutshell is a thoroughly researched
reference to these exams The book is divided into four parts, one for each of the
LPI exams Each part features not only a summary of the core skills you need, but sample exercises and test questions, along with helpful hints
Praise for the first edition:
"Although O'Reilly's Nutshell series are intended as 'Desktop
Reference' manuals, I have to recommend this one as a good
all-round read; not only as a primer for LPI certification, but as an excellent introductory text on GNU/Linux In all, this is a valuable addition to
O'Reilly's already packed stable of Linux titles and I look forward to more from the author."
First Monday
Trang 3By Jeff Dean, Bruno Gomes Pessanha,Nicolai Langfeldt, Steven Pritchard, James Stanger
Publisher: O'Reilly Pub Date: July 2006 Print ISBN-10: 0-596-00528-8 Print ISBN-13: 978-0-59-600528-3 Pages: 978
Trang 10by Steven Pritchard, Bruno Gomes Pessanha, Nicolai Langfeldt,James Stanger, and Jeff Dean
Copyright © 2006 O'Reilly Media, Inc All rights reserved
Printed in the United States of America
Published by O'Reilly Media, Inc., 1005 Gravenstein HighwayNorth, Sebastopol, CA 95472
O'Reilly books may be purchased for educational, business, orsales promotional use Online editions are also available for
most titles (safari.oreilly.com) For more information, contactour corporate/institutional sales department: (800) 998-9938 or
Trang 11Many of the designations used by manufacturers and sellers todistinguish their products are claimed as trademarks Wherethose designations appear in this book, and O'Reilly Media, Inc.was aware of a trademark claim, the designations have beenprinted in caps or initial caps
While every precaution has been taken in the preparation of thisbook, the publisher and authors assume no responsibility forerrors or omissions, or for damages resulting from the use ofthe information contained herein
ISBN: 0-596-00528-8
[C]
Trang 12Certification of professionals is a time-honored tradition in manyfields, including medicine and law As small computer systemsand networks proliferated over the last decade, Novell and
preparation industry has formed to service a constant stream ofnew certification candidates
Certification programs, offered by vendors such as Sun and
Hewlett-Packard, have existed in the Unix world for some time.However, since Solaris and HP-UX aren't commodity products,those programs don't draw the crowds that the PC platform
does Linux, however, is different Linux is both a commodityoperating system and is PC- based, and its popularity continues
to grow at a rapid pace As Linux deployment increases, so toodoes the demand for qualified and certified Linux system
administrators
A number of programs such as the Linux Professional Institute(LPI), the Red Hat Certified Engineer (RHCE) program, and
level candidates with six months' experience LPI's program is a
Trang 13The Linux Professional Institute
The Linux Professional Institute (http://www.lpi.org) is a
nonprofit organization formed with the single goal of providing astandard for vendor-neutral certification This goal is being
achieved by certifying Linux administrators through a modifiedopen source development process LPI seeks input from thepublic for its exam Objectives and questions, and anyone is
welcome to participate It has both paid and volunteer staff andreceives funding from some major names in the computer
industry The result is a vendor-neutral, publicly developed
program that is offered at a reasonable price
LPI currently organizes its Linux Professional Institute
Certification (LPIC) series in two levels: LPIC Levels 1 and 2.Each level consists of two exams that are priced at about U.S
$100 each (prices vary by continent) This book covers the LPICLevel 1 Exams 101 and 102 in Parts I and II, while LPIC Level 2Exams, 201 and 202 are covered in Parts III and IV
LPI is in the process of building a third level of exams, whichwill focus on specialty fields It is also working with other
organizations to start building certification modules based onthe LPI standard
Level 1 is aimed at junior to midlevel Linux administrators withabout two years of practical system administration experience.The Level 1 candidate should be comfortable with Linux at thecommand line as well as capable of performing simple tasks,including system installation and troubleshooting Level 1
certification is required prior to obtaining Level 2 certificationstatus
Trang 14leaders A Level 2 administrator is likely to have four or moreyears of practical administration experience Beyond the ability
to work effectively with native tools on standard Linux
distributions, Level 2 covers customizing all aspects of your
Linux systems, from the kernel to its filesystems, as well asimplementing a number of network applications for Linux
servers At a glance, Level 2 Objectives may appear to overlapseveral areas of content with Level 1; however, the depth andexpertise level required is much higher Often, a Level 2
candidate is expected to be the individual that a Level 1
candidate would refer to for higher-level projects or problemswithin a production environment
Level 2 certification will be required prior to obtaining the futureLevel 3 certification status
All of LPI's exams are based on a published set of technical
Objectives These technical Objectives are posted on LPI's website and for your convenience printed at the beginning of eachchapter within this book Each Objective set forth by LPI is
assigned a numeric weight, which acts as an indicator of theimportance of the Objective Weights run between 1 and 8, withhigher numbers indicating more importance An Objective
carrying a weight of 1 can be considered relatively unimportantand isn't likely to be covered in much depth on the exam
Objectives with larger weights are sure to be covered on theexam, so you should study these closely The weights of theObjectives are provided at the beginning of each chapter
Audience for This Book
The primary audience for this book is, of course, candidatesseeking the LPIC certification These may range from
administrators of other operating systems looking for a Linuxcertification to complement an MSCE certification to Unix
administrators wary of a growing pool of Linux-certified job
Trang 15Due to the breadth of knowledge required by the LPI Objectivesand the book's one-to-one coverage, it also makes an excellentreference for skills and methods required for the day-to-day use
of Linux If you have a basic working understanding of Linuxadministration, the material in this book will help fill gaps inyour knowledge while at the same time preparing you for theLPI Exams, should you choose to take them
This book should also prove to be a valuable introduction fornew Linux users and administrators looking for a broad,
detailed introduction to Linux Part of the LPI exam-creationprocess includes a survey of Linux professionals in the field Thesurvey results drive much of the content found on the exams.Therefore, unlike general-purpose introductory Linux books, all
The book is presented in four parts Part I covers Exam 101 and
Part II covers Exam 102 New for the second edition, we haveadded Parts III and IV to cover Exams 201 and 202 for LPI'sLevel 2 Exams Each part contains chapters dedicated to the LPITopics, and each of those sections contains information on all ofthe Objectives set forth for the Topic In addition, each part
Trang 16Study guide
This chapter offers a few tips to prepare for the LPI Examsand introduces the Objectives contained in the Topic
chapters that follow
Topic chapters
A separate chapter covers each of the Topic areas on theexam These chapters provide background information andin-depth coverage for each Objective, with On the Exam tipsdispersed throughout
Review questions and exercises
Trang 17a series of exercises that can be used on a running Linuxsystem to give you valuable hands-on experience beforeyou take the exams
Practice test
The practice test is designed to be similar in format andcontent to the actual LPI Exams You should be able to
attain at least an 80% score on the sample test before
attempting the live exam
Highlighter's index
This unique chapter contains highlights and important factsculled from the Topic chapters You can use this as reviewand reference material prior to taking the actual exams.This chapter was omitted from parts II and IV due to thevariety and complexity of topics disscussed in those
sections
There is also a glossary at the back of the book, which you canuse to help familiarize yourself with different Linux-related
terms
Conventions Used in This Book
This book follows certain typographical conventions:
Italic
Trang 18Provides information about areas you should focus on when studying for the
exam.
Trang 19Warning: Indicates a warning or caution.
A final word about syntax: in many cases, the space between
an option and its argument can be omitted In other cases, thespacing (or lack of spacing) must be followed strictly For
documentation You do not need to contact us for permissionunless you're reproducing a significant portion of the code Forexample, writing a program that uses several chunks of codefrom this book does not require permission Selling or
distributing a CD-ROM of examples from O'Reilly books does
require permission Answering a question by citing this bookand quoting example code does not require permission
Incorporating a significant amount of example code from this
book into your product's documentation does require
permission
We appreciate, but do not require, attribution An attributionusually includes the title, author, publisher, and ISBN For
example: "LPI Linux Certification in a Nutshell by Steven
Pritchard et al Copyright 2006 O'Reilly Media, Inc., 0-596-00528-8."
If you feel your use of code examples falls outside fair use orthe permission given above, feel free to contact us at
permissions@oreilly.com
Trang 20When you see a Safari® Enabled icon on the cover ofyour favorite technology book, that means the book is availableonline through the O'Reilly Network Safari Bookshelf Safari
offers a solution that's better than e-books It's a virtual librarythat lets you easily search thousands of top tech books, cut andpaste code samples, download chapters, and find quick answerswhen you need the most accurate, current information Try itfree at http://safari.oreilly.com
How to Contact Us
We have tested and verified the information in this book to thebest of our ability, but you may find that features have changed(or even that we have made mistakes!) As a reader of this
book and as an LPI examinee, you can help us to improve
future editions Please let us know about any errors you find, aswell as your suggestions for future editions, by writing to:
To comment or ask technical questions about this book, email:
bookquestions@oreilly.com
Trang 21http://www.oreilly.com
If you have taken one or all of the LPIC Exams after preparingwith this book and find that parts of this book could betteraddress your exam experience, we'd like to hear about it Ofcourse, you are under obligation to LPI not to disclose specificexam details, but comments regarding the coverage of the LPIObjectives, level of detail, and relevance to the exam will bemost helpful We take your comments seriously and will dowhatever we can to make this book as useful as it can be
Acknowledgments
The size and complexity of the LPI tests required the
collaboration of numerous authors and reviewers to get thisedition done Material was contributed by Bj rn Ruberg
(Sendmail, DNS, networking, printing), Adam Haeder (file andservice sharing, web services), and Faber Fedor
(troubleshooting)
For the second edition, we thank reviewers Keith Burgess,Donald L Corbet, Chander Kant, and Rick Rezinas
Bruno dedicates his work to his grandfather, Oswaldo CabralPessanha, in memorium
Trang 22Part I covers the Topics and Objectives for the LPI's
General Linux Certification for Exam 101 and includes thefollowing sections:
Chapter 10, Exam 101 Highlighter's Index
Trang 23LPI offers its exams through Pearson VUE
(http://www.vue.com), Thomson Prometric
(http://www.prometric.com), and at on-site locations at specialLinux events, such as tradeshows Before registering for any ofthese testing methods, you need to obtain an LPI ID number byregistering directly with LPI To obtain your LPI ID, visit
http://www.lpi.org/en/register.html Once you've received yourLPI ID, you may continue your registration by registering with atesting center or special event You can link to any of theseregistration options through LPI's registration web site
In testing centers, the exams are delivered using a PC-basedautomated examination program As of this writing, the examsare available in both English and Japanese Exam questions arepresented in multiple-choice single-answer, multiple-choice
scoring appropriately so all forms are equally difficult
Trang 24LPI Exam 101 is one of two exams required for the LPIC Level 1certification In total, 14 major Topic areas are specified forLevel 1; this exam tests your knowledge on 5 of them
Exam Topics are numbered using a level.topic notation (e.g.,
1.101, 1.102, 1.113) In LPI's early stages of development,Topics were assigned to exams based on a different schemethan we see today When the scheme changed, the Topics wereredistributed to Exams 101 and 102, but the pairing of Topic
numbers to exams was dropped As a result, LPI has 1.x and 2.x Topics in both Level 1 Exams In the 2002 revision of the
higher numbers indicating more importance An Objective
carrying a weight of 1 can be considered relatively unimportantand isn't likely to be covered in much depth on the exam
Objectives with larger weights are sure to be covered more
heavily on the exam, so you should study these Topics closely.The weights of the Objectives are provided at the beginning of
Trang 25managing shared libraries, and using package management systems such as Debian and Red Hat (RPM).
a command line, processing text streams using command-line tools, managing files, manipulating text with pipes and redirects, monitoring system processes, managing task priorities, using
regular expressions, and editing files with vi lilo, syslog, runlevels, shutdown, and reboot.
such as XDM, GDM, or KDM, and installing and customizing
Window Manager Environments.
Trang 26developed The Topic numbers serve only as reference and arenot used on the exam
Exam 101 lasts a maximum of 90 minutes and contains
approximately 65 questions The exam is administered using acustom application on a PC in a private room with no notes orother reference material The majority of the exam is made up
of multiple-choice single-answer questions These questionshave only one correct answer and are answered using radio
buttons Some of them present a scenario needing
administrative action Others seek appropriate commands for aparticular task or proof of understanding of a particular concept
About 10 percent of the exam questions are multiple-choicemultiple-answer questions, which are answered using
checkboxes These questions specify that they have multiplecorrect responses, each of which must be checked to get theitem correct There is no partial credit for partially answereditems This is probably the most difficult question style becausethe multiple answers increase the likelihood of mistakes Butthey also are a good test of your knowledge of Unix commands,since an incorrect response on any one of the possible answerscauses you to miss the entire question
The exam also has fill-in-the-blank questions These questionsprovide a one-line text area input box for you to fill in your
answer These questions check your knowledge of concepts
such as important files and commands, plus common facts thatyou are expected to be aware of The second release of the LPILevel 1 exams included more of these types of items since thepsychometric evaluation LPI uses for exam development
determined that the fill-in-the-blank type of questions were the
Trang 27best indicators for truly competant administrators Don't let thisscare you, however, since most of these items accept multipleanswers Unless specified otherwise they are not case-sensitiveand do not require full paths in your answers.
Trang 28Part I of this book contains a section for each of the five Topicsfound on LPI Exam 101 Each section details certain Objectives,which are described here and on the LPI web site,
http://www.lpi.org/p-obj-101rel2.html
Trang 29LPI Exam 101 is thorough, but you should find it fairly
straightforward if you have a solid foundation in Linux concepts.You won't come across questions that intend to trick you, andyou're unlikely to find ambiguous questions
Exam 101 mainly tests your knowledge of facts, including
commands and their common options, important file locations,configuration syntax, and common procedures Your recollection
of these details, regardless of your level of Linux administrationexperience, will directly influence your results
For clarity, the material in the following sections is presented inthe same order as the LPI Topics and Objectives However, youmay choose to study the Topics in any order you wish To assistyou with your preparation, Tables 2-1 through 2-5 list the Topicsand Objectives found on Exam 101 Objectives within each
Topic occupy rows of the corresponding table, including the
Objective's number, description, and weight The LPI assigns a
weight for each Objective to indicate the relative importance of
that Objective on the exam on a scale of 1 to 8 We recommendthat you use the weights to prioritize what you decide to study
in preparation for the exams After you complete your study ofeach Objective, simply check it off here to measure and
Trang 321 5 Install and Configure X11
2 3 Set Up a Display Manager
4 5 Install and Customize a Window Manager Environment
Trang 33
(Topic 1.101)
This Topic requires general knowledge of fundamental PC
architecture facts that you must know before attempting anyoperating system installation It includes these Objectives:
Objective 1: Configure Fundamental BIOS Settings
This Objective states that candidates should be able to
configure fundamental system hardware by making thecorrect settings in the system BIOS This Objective includes
a proper understanding of BIOS configuration issues such
as the use of LBA on integrated device electronics (IDE)hard disks larger than 1024 cylinders, enabling or disablingintegrated peripherals, and configuring systems with (orwithout) external peripherals such as keyboards It alsoincludes the correct setting for IRQs, DMAs, and I/O
addresses for all BIOS administrated ports and settings forerror handling Weight: 1
Trang 34This Objective states that the candidate should be able toconfigure SCSI (pronounced "scuzzy") devices using theSCSI BIOS as well as the necessary Linux tools He shouldalso be able to differentiate between the various types ofSCSI This Objective includes manipulating the SCSI BIOS
to detect used and available SCSI IDs and setting the
correct ID number for different devices, especially the bootdevice It also includes managing the settings in the
computer's BIOS to determine the desired boot sequence ifboth SCSI and IDE drives are used Weight: 1
Objective 5: Set Up Different PC Expansion Cards
This Objective states that a candidate should be able toconfigure various cards for the various expansion slots Sheshould know the differences between ISA and PCI cardswith respect to configuration issues This Objective includesthe correct settings of IRQs, DMAs, and I/O ports of thecards, especially to avoid conflicts between devices It also
necessary hardware settings for internal devices (IRQs,
Trang 35serial port for 115.2 Kbps and the correct modem settingsfor outbound PPP connections Weight: 1
Objective 7: Configure USB Devices
Candidates should be able to activate USB support, use andconfigure different USB devices This Objective includes thecorrect selection of the USB chipset and corresponding
module It also includes knowledge of the basic architecture
of the layer model of USB as well as the different modulesused in the different layers Weight: 1
Trang 363.1 Objective 1: Configure Fundamental BIOS Settings
Setting up a PC for Linux (or any other operating system)
requires some familiarity with the devices installed in the
system and their configuration Items to be aware of includemodems, serial and parallel ports, network adapters, SCSI
adapters, hard drives, USB controllers, and sound cards Many
of these devices, particularly older ones, require manual
configuration of some kind to avoid conflicting resources Therest of the configuration for the system hardware is done in thePC's firmware, or Basic Input/Output System (BIOS)
3.1.1 BIOS
The firmware located in a PC, commonly called the BIOS, isresponsible for bringing all of the system hardware to a state atwhich it is ready to boot an operating system Systems vary,but this process usually includes system initialization, the
testing of memory and other devices, and ultimately locating anoperating system from among several storage devices In
addition, the BIOS provides a low-level system configurationinterface, allowing the user to choose such things as boot
devices and resource assignments Quite a few BIOS firmwarevendors provide customized versions of their products for
various PC system architectures Exams do require an
understanding of the basics For example, a laptop BIOS maydiffer significantly from a desktop system of similar capabilityfrom the same manufacturer Due to these variations, it's
impossible to test specifics, but the LPIC Level 1 exams do
require an understanding of the basics
At boot time, most PCs display a method of entering the BIOSconfiguration utility, usually by entering a specific keystroke
Trang 37in which system settings can be configured appears Depending
on the BIOS vendor, these will include settings for disks,
memory behavior, on-board ports (such as serial and parallelports), the clock, as well as many others
3.1.1.1 Date and time
board hardware clock This clock is initially set in the BIOS
One of the basic functions of the BIOS is to manage the on-configuration by entering the date and time in the appropriatefields Once set, the internal clock keeps track of time and
makes the time available to the operating system The
operating system can also set the hardware clock, which is
often useful if an accurate external time reference, such as anNTPD server (see Chapter 18), is available on the network whilethe system is running
3.1.1.2 Disks and boot devices
Another fundamental configuration item required in BIOS
settings is the selection of storage devices Modern PCs can
contain a variety of removable and fixed media, including floppydisks, hard disks, CD-ROMs, CD-RWs, DVD-ROMs, and Zip
and/or Jaz drives Newer systems are able to detect and
properly configure much of this hardware automatically
However, older BIOS versions require manual configuration.This may include the selection of floppy disk sizes and disk driveparameters
Most PCs have at least three bootable media types: an internalhard disk (IDE or SCSI, or perhaps both), a CD-ROM drive
(again IDE or SCSI), and a floppy disk After initialization, theBIOS seeks an operating system (or an operating system
loader, such as the Linux Loader [LILO]) on one or more of
Trang 38booting from the floppy or CD-ROM first, then the hard disk, butthe order is configurable in the BIOS settings
In addition to these default media types, many server
motherboard BIOS (as well as high-end system motherboards)support booting from a network device such as a NIC with abootable ROM This is often used when booting diskless
settings are unique to avoid conflicts with other devices
I/O addresses are locations in the microprocessor's memory map (a list of defined memory addresses) reserved for
input/output devices such as network interfaces The
microprocessor can write to the devices in the same way it
writes to memory, which simplifies the device interface If
multiple devices inadvertently share the same I/O address, the
Trang 39DMA allows some devices to work directly with memory through
a DMA channel, freeing the microprocessor for other tasks
Without DMA, data must be read from I/O ports for a deviceand stored in memory, all by the microprocessor A device thathas DMA capabilities has direct access to memory and writes itsown data there when the microprocessor is busy with
computation This can improve performance
These are all finite resources, and it is important to avoid
conflicting settings Common devices such as serial and parallelports have standard assignments, as shown in Table 3-1
Trang 40concurrently share the interrupt and exchange serial data
Otherwise, communications would fail if both ports from eitherpair were used together
On the Exam
You don't have to memorize all the possible device settings for the PC
architecture, but you should be ready to answer specific questions regarding
some of the more common ones, such as interrupt settings for serial and parallel ports You should also be able to identify conflicting I/O and IRQ assignments
given a scenario.
3.1.3 1024-Cylinder Limit
With most PC operating systems, data loaded by the BIOS toboot the operating system is found at the beginning of the disk
in the Master Boot Record (MBR) Windows users rarely have tothink about the MBR because there is no alternate location forthe boot record With Linux, however, the user can place theboot loader (LILO or GRUB) into either the MBR or the root