1. “This is the all-inclusive Linux+ guide
100%
ONE HUNDRED PERCENT
you’ve been looking for.”
— Tim Sosbe, Editorial Director, Certification Magazine
COMPREHENSIVE
AUTHORITATIVE
WHAT YOU NEED
ONE HUNDRED PERCENT
Master the
material for the
CompTIA Linux+
Exam XK0-001
Test your knowledge
with assessment
questions and
scenario problems
Practice on
state-of-the-art
test-preparation
software
Linux+ ®
Test Engine powered by
Trevor Kay, Linux+, A+, Network+, Server+
Author of Server+ Certification Bible
4. ®
Linux+
Certification Bible
Trevor Kay
Best-Selling Books • Digital Downloads • e-Books • Answer Networks • e-Newsletters • Branded Web Sites • e-Learning
New York, NY ✦ Cleveland, OH ✦ Indianapolis, IN
6. About the Author
Trevor Kay is a holder of four CompTIA certifications: A+, Network+, Server+, and
Linux+. Trevor is also the author of the Server+ Certification Bible. Trevor started
his IT career working at a local museum as a desktop publisher. From there, he has
held many positions, from IT help desk, technical support, and network administra-
tor positions for local companies to having a key roll in the Y2K projects of one of
the largest financial institutes in Canada.
7. Credits
Acquisitions Editor Project Coordinator
Katie Feltman Jennifer Bingham
Project Editor Graphics and Production Specialists
Amanda Munz Peterson Beth Brooks, Laurie Petrone,
Jill Piscitelli, Heather Pope
Technical Editor
Joe Byrne Quality Control Technician
John Bitter, Valery Bourke, Angel Perez
Question Writer
James Russell Permissions Editor
Laura Moss
Copy Editor
Rebekah Mancilla Media Development Specialist
Travis Silvers
Editorial Manager
Ami Frank Sullivan Media Development Coordinator
Marisa Pearman
Senior Vice President, Technical
Publishing Proofreading and Indexing
Richard Swadley TECHBOOKS Production Services
Vice President and Publisher Cover Image
Mary Bednarek Anthony Bunyan
8. This book is dedicated to all my family and friends. Your tremendous support made
this book possible.
9. Preface
W ®
elcome to the Linux + Certification Bible! This book is designed to help you
acquire the knowledge, skills, and abilities you need to pass CompTIA’s
Linux+ Certification:
* Exam XK0-001 : Linux+ Certification
This book is designed to be the only book or course you need to prepare for and
pass CompTIA’s Linux+ Certification exam, which is one of the newest members of
CompTIA’s certification family.
This book deals with all of the objectives stated by CompTIA for the Linux+ exam.
You learn how to deal with planning a Linux implementation (including installing
Linux in a GUI or text-based environment) and configuring the Linux operating sys-
tem after installation. This book also teaches you how to administrate and maintain
your Linux system, troubleshoot common problems, and how to identify, install,
and maintain system hardware.
My hope is that you’ll find this book the most helpful Linux+ Certification product
reference that you’ve ever read. I also hope that you’ll use it not only to prepare for
CompTIA’s Linux+ Certification exam, but that you’ll come back to it again and
again as you perform your day-to-day Linux professional tasks.
How This Book Is Organized
This book is organized into seven major parts, followed by a glossary, an index, and
one CD. Here’s what you’ll find in this book:
Part I: Linux Basics
Part I presents the information that you need to understand Linux. This part covers
the creator of Linux and a brief history about the development of Linux . The Linux
Kernel and the many different types Linux distributions are also discussed.
Part II: Installation
Part II includes the instructions on how to perform a proper installation of Linux.
GUI and text-based installations are covered. Identifying all system requirements
and validating that they support Linux is also included. The different types of roles
10. Preface ix
and services of Linux system are discussed along with identifying where to obtain
software and resources.
Part III: Configuration
Part III is about configuring your Linux system. This part teaches you how to config-
ure X windows with automated utilities and workstations for remote access . This
part also covers how to add and configure printers along with information about
installing and configuring add-in hardware, reconfiguring the boot loader, and
editing basic configuration files.
Part IV: Administration
Part IV covers how to administrate a Linux-based environment. This part shows
you how to create and delete users, modify existing users, and create, modify, and
delete groups. Next, this part teaches you how to identify and change file permis-
sions, manage and navigate the Linux hierarchy, and mount and manage file sys-
tems, devices, common shell commands, and expressions. You also learn how to
use network commands to create, extract, and edit file and tape archives by using
tar. The part ends with the information that you need to manage runlevels; start-
ing, stopping, and restarting services; managing print spool and queues; using vi;
and managing and navigating the GUI. It also teaches you how to program basic
shell script by using common shell commands.
Part V: Maintaining the Linux System
Part V is about maintaining the Linux system. This part provides you with informa-
tion on how to monitor and maintain processes, network interfaces, system logs,
security, and backup. Areas in this part include creating and managing local storage
devices and file systems, understanding functions of the cron command, identify-
ing core dumps, and how to run and interpret ifconfig. This part focuses on down-
loading and installing patches and updates; identifying, executing, and killing
processes; monitoring system log files; and how to properly document work per-
formed on a system. This part also teaches you how to perform and verify backups
and restores, gives you security best practices, and teaches you how to set daemon
and process permissions.
Part VI: Troubleshooting and Maintaining
System Hardware
Part VI is about troubleshooting Linux systems. This part provides you with the
basic knowledge and skills to identify, inspect, and diagnose problems in the Linux
operating system and how to apply remedies by using common commands and util-
ities. In this part, you learn how to identify and locate the problem by determining
whether the problem originates from: hardware, operating system, application
11. x ®
Linux + Certification Bible
software, configuration, or the user. You also learn troubleshooting best practices,
editing configuration files based on symptoms using system utilities, using systems
boot disk(s) and root disks on workstations and servers to diagnose and rescue file
systems. This part also teaches you how to inspect and determine causes of errors
from system log files, how to use disk utilities to solve file system problems, and
how to recognize common errors. You learn how to take appropriate action on boot
errors, how to identify backup and restore errors, how to identify and use trouble-
shooting commands, and how to locate troubleshooting resources and updates.
This part also covers the knowledge that you need to maintain your Linux system
hardware. This part covers the knowledge and skills you need to install, configure
and troubleshoot core and peripheral hardware in a Linux environment. This part
includes information on generic hardware issues and Linux specific hardware
issues. Topics in this part include: Identifying basic terms, concepts, and functions
of system components, including how each component should work during normal
operation and during the boot process; removing and replacing hardware and
accessories, identifying basic networking concepts; and proper procedures for diag-
nosing and troubleshooting ATA, SCSI, and peripheral devices. You also find the
knowledge on how to properly troubleshoot core system hardware, including pro-
cessors, RAM, and mainboards.
CD-ROM
The compact disc included with this book contains some excellent resources and
programs. You’ll find this entire book in Adobe PDF format and a variety of different
programs that I hope you will find useful. To find out more about the CD-ROM,
please see Appendix A.
How Each Chapter Is Structured
A lot of thought went into the structure and design of this book, particularly the
specific elements that will provide you with the best possible learning and exam
preparation experience.
Here are the elements you’ll find in each chapter:
✦ The complete exam objectives that are covered in the chapter
✦ A Chapter Pre-Test to test your knowledge before reading the chapter
✦ Clear, concise text on each topic
✦ Screen shots and graphics that are worth more than a thousand words
✦ A Summary
12. Preface xi
✦ A comprehensive Study Guide that contains:
• Exam-style Assessment Questions
• Scenario problems for you to solve,
• A Lab that you can use to sharpen your skills
• Answers to Chapter Pre-Test Questions, Assessment Questions, and
Scenarios
How to Use This Book
This book can be used either by individuals working independently or by groups in
a formal classroom setting.
For best results, I recommend the following plan of attack as you use this book.
First, take the Chapter Pre-Test, and then read the chapter and the Key Point
Summary. Use this summary to see if you really understand the key concepts. If you
don’t, go back and reread the section(s) that you’re not clear on. Then, do all of the
Assessment Questions and Scenarios at the end of the chapter. Remember, the
important thing is to master the tasks that are tested by the exams.
The chapters of this book are designed to be studied sequentially. In other words,
it’s best if you complete Chapter 1 before you proceed to Chapter 2. A few chapters
can probably stand alone, but all in all, I recommend a sequential approach.
After you’ve completed your study of the chapters and reviewed the Assessment
Questions in the book, use the test engine on the compact disc included with this
book to get some experience answering practice questions. The practice questions
will help you assess how much you’ve learned from your study and will also famil-
iarize you with the type of exam questions you’ll face when you take the real exam.
After you identify a weak area, you can restudy the corresponding chapters to
improve your knowledge and skills in that area.
Although this book is a comprehensive study and exam preparation guide, it does
not start at ground zero. I assume that you have the following knowledge and skills
at the outset:
✦ Basic terminology and basic skills to use a Linux distribution
✦ Basic mouse skills: being able to left-click, right-click, double-click, use the
pointer, and so on.
✦ Basic PC hardware and networking comprehensions
If you meet these prerequisites, you’re ready to begin this book.
13. xii ®
Linux + Certification Bible
If you don’t have the basic Linux experience or mouse skills, I recommend that you
work through a self-study book, such as Linux For Dummies (Hungry Minds, Inc.) or
the Linux Bible (Hungry Minds, Inc.).
Conventions Used in This Book
Every book has its own set of conventions, so I’ll explain the icons I’ve used in this
book.
You’ll see icons throughout each chapter. Six types of icons are used in this book.
Below are the explanations of each icon:
This icon is used to warn you that something unfortunate could happen if you’re
not careful. It also points out information that could save you a lot of grief. It’s
often easier to prevent a tragedy than to fix it afterwards.
This icon points you to another place in this book for more coverage of a particu-
lar topic. It may point you back to a previous chapter where important material
has already been covered, or it may point you ahead to let you know that a topic
will be covered in more detail later on.
This icon points out important information or advice for those preparing to take
the Linux+ Certification exam.
Sometimes things work differently in the real world than books — or product
documentation — say they do. This icon draws your attention to the author’s real-
world experiences, which will hopefully help you on the job (if not on the Linux+
certification exam).
This icon is used to draw your attention to a little piece of friendly advice, a help-
ful fact, a shortcut, or a bit of personal experience that might be of use to you.
This icon points out exactly where an exam objective is covered in a particular chap-
ter, so you can focus your efforts on the areas where you need the most practice.
14. Acknowledgments
I would like to thank my brother, Nigel Kay, for his input and contributions to this
book and the many hours he spent with me on this project to make this book the
best it can be.
Thanks to everyone at Hungry Minds, including Katie Feltman, Acquisitions Editor;
Amanda Peterson, Project Editor; Rebekah Mancilla, Copy Editor; Joe Byrne,
Technical Editor; and to everyone in the Graphics and Production departments for
their hard work and dedication to making this book a reality.
And special thanks to my mother and close friends: Clare Steed, Sharon Kay,
Hamish Humphray, Walter Bell, Dell Errington, Anne Greenfield, The Testolin family,
Rob (The Sculpture) Heath, Joe Piotrowski, Kevin Benjamin, Russ Francis, Jim Esler,
Lisa Mior, Ricki Fudge, Beth Crowe, Elena N. Ranchina, Greg Stephens, Steve
Marino, and Ken Dejong for their tremendous support during this project.
30. P A R T
Linux Basics I
✦ ✦ ✦ ✦
T he Linux+ exam covers 14 percent on Linux basics.
Understanding how Linux has a wide variety of distribu-
tions available; knowing the primary distributions and the
In This Part
packages that are included with each distribution is impera- Chapter 1
tive in order to implement a successful Linux installation for Basic Linux Concepts
the office or customers.
Chapter 2
The chapters in this part focus on defining Linux and explor- Linux Kernel and
ing its origins. I discuss the GNU GPL; I also discuss specific Distributions
terms and their meanings, including: Open Source, Closed
Source, artistic license, Freeware, and Shareware. This part ✦ ✦ ✦ ✦
also goes into detail about the growth of Linux, and I give
you a basic understanding of the specific characteristics
with which Linux is equipped.
The end of this part will focus on the Linux kernel and how
you can determine the status, features, and reliability of the
kernel based on its version. Also covered are package and
package solutions and the different types of Linux distribu-
tions that are available. Knowing and understanding the
pros and cons of each distribution will help you to decide
what type of distribution is right for you, your company,
and your customers.
31.
32. Basic Linux
Concepts
1
C H A P T E R
✦ ✦ ✦ ✦
EXAM OBJECTIVES
✦ 1.5 Compare and contrast how major Linux licensing schemes
work (e.g., GNU/GPL, freeware, shareware, open source, closed
source, artistic license)
33. 4 Part I ✦ Linux Basics
CHAPTER PRE-TEST
1. What is Linux?
2. What is GNU?
3. What is GPL?
4. What is the difference between Open and Closed Source?
5. What is the difference between Freeware and Shareware?
6. Who created Linux?
7. Why was Linux created?
8. Why is Linux not Unix?
9. What is POSIX and why is it important to Linux?
10. Why is desktop and Enterprise use of Linux growing so rapidly?
✦ Answers to these questions can be found at the end of the chapter. ✦