1. Linux+Linux+
The only guide you need for Linux+ exam success . . .
You’re holding in your hands the most comprehensive and effective guide available for the CompTIA Linux+
exam. Trevor Kay delivers incisive, crystal-clear explanations of every Linux+ topic, highlighting exam-
critical concepts and offering hands-on tips that can help you in your real-world career. Throughout, he
provides pre-tests, exam-style assessment questions, and scenario problems — everything you need to
master the material and pass the exam.
Shelving Category:
Certification
Reader Level:
Beginning to Advanced
System Requirements:
PC with Pentium 120 mhz or greater;
32 MB RAM; 500 MB free hard drive space.
See the About the CD appendix for details
and complete system requirements.
ISBN 0-7645-4881-6
$59.99 USA
$89.99 Canada
£44.99 UK incl. VAT
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
“This is the all-inclusive Linux+ guide
you’ve been looking for.”
— Tim Sosbe, Editorial Director, Certification Magazine
,!7IA7G4-feiibj!:p;p;T;T;tw w w . h u n g r y m i n d s . c o m
100%O N E H U N D R E D P E R C E N T
COMPREHENSIVE
A U T H O R I T A T I V E
W H AT YO U N E E D
O N E H U N D R E D P E R C E N T
*85555-AJJBAe
100%C O M P R E H E N S I V E
Covers CompTIA Linux+
Exam XK0-001
Linux+Linux+Bible
Test-prep
software on
CD-ROM
About the Author
Trevor Kay is A+, Network+, Server+, and Linux+
certified. Trevor is currently a technical consultant and
author. He has worked as an IT helpdesk consultant,
technical support specialist, and network administrator,
and played a key role in Y2K preparations at one of
Canada’s largest financial organizations.
Trevor Kay, Linux+, A+, Network+, Server+
Author of Server+ Certification Bible
Inside, you’ll find complete coverage
of Linux+ exam objectives
• Get up to speed on Linux basics and understand the differences
between different Linux distributions
• Tackle Linux installation, from planning to network configuration,
dual-boot systems, and upgrades
• Get the scoop on managing Linux disks, file systems, and
processes; implementing security; and backing up your system
• Learn the ins and outs of configuring the X Window
system and setting up a network
• Find out how to establish users and groups, navigate
the Linux file system, and use Linux system commands
• Delve into troubleshooting techniques for the boot
process, software, and networking
• Get a handle on maintaining system hardware, from
CPU and memory to peripherals
• Test engine powered by Boson Software, with hundreds of sample questions
• Linux tools, including Phatlinux, Big brother system
and network monitor, Apache Web Server,
Squid Web Proxy Cache, AbiWord word
processor, and Encompass
• Plus an e-version of the book
Hundreds of unique, exam-like questions
give you a random set of questions each
time you take the exam.
Test Engine powered by
Certification
“This is the all-inclusive Linux+ guide
you’ve been looking for.”
— Tim Sosbe, Editorial Director, Certification Magazine
Test-Prep Software and More on CD-ROM
VISIBLE SPINE = 1.75Turn in: .75 Board: 7.0625 Turn in: .75.4375 .4375 Board: 7.0625
KAY
®®
®®
A customizable
format enables
you to define
your own
preferences
for question
presentation.
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
014881-6 FM.F 11/12/01 8:28 AM Page iii
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.
014881-6 FM.F 11/12/01 8:28 AM Page v
7. Credits
Acquisitions Editor
Katie Feltman
Project Editor
Amanda Munz Peterson
Technical Editor
Joe Byrne
Question Writer
James Russell
Copy Editor
Rebekah Mancilla
Editorial Manager
Ami Frank Sullivan
Senior Vice President, Technical
Publishing
Richard Swadley
Vice President and Publisher
Mary Bednarek
Project Coordinator
Jennifer Bingham
Graphics and Production Specialists
Beth Brooks, Laurie Petrone,
Jill Piscitelli, Heather Pope
Quality Control Technician
John Bitter, Valery Bourke, Angel Perez
Permissions Editor
Laura Moss
Media Development Specialist
Travis Silvers
Media Development Coordinator
Marisa Pearman
Proofreading and Indexing
TECHBOOKS Production Services
Cover Image
Anthony Bunyan
014881-6 FM.F 11/12/01 8:28 AM Page vi
8. This book is dedicated to all my family and friends. Your tremendous support made
this book possible.
014881-6 FM.F 11/12/01 8:28 AM Page vii
9. Preface
Welcome 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
014881-6 FM.F 11/12/01 8:28 AM Page viii
10. ixPreface
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
014881-6 FM.F 11/12/01 8:28 AM Page ix
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
014881-6 FM.F 11/12/01 8:28 AM Page x
12. xiPreface
✦ 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.
014881-6 FM.F 11/12/01 8:28 AM Page xi
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.
014881-6 FM.F 11/12/01 8:28 AM Page xii
14. Acknowledgments
Iwould 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.
014881-6 FM.F 11/12/01 8:28 AM Page xiii
30. Linux Basics
The 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
packages that are included with each distribution is impera-
tive in order to implement a successful Linux installation for
the office or customers.
The chapters in this part focus on defining Linux and explor-
ing its origins. I discuss the GNU GPL; I also discuss specific
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.
✦ ✦ ✦ ✦
In This Part
Chapter 1
Basic Linux Concepts
Chapter 2
Linux Kernel and
Distributions
✦ ✦ ✦ ✦
P A R T
II
024881-6 PtO1.F 11/12/01 8:28 AM Page 1
32. Basic Linux
Concepts
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)
11C H A P T E R
✦ ✦ ✦ ✦
034881-6 ch01.F 11/12/01 8:28 AM Page 3
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. ✦
034881-6 ch01.F 11/12/01 8:28 AM Page 4
34. 5Chapter 1 ✦ Basic Linux Concepts
In this chapter, I introduce you to the basics of Linux and I discuss a brief history
of Linux. I also answer several important questions about Linux, including: What
are the concepts of GNU, GPL, Open Source, Freeware, Shareware, Closed Source,
and Artistic License? How is Linux growing? Why is Linux used on the desktop as
well as in the Enterprise? Getting to the bottom of these concepts and ideas will
help you to understand Linux and its popularity.
What is Linux?
Linux (pronounced “LIH-nucks”) is a 32-bit operating system (OS) that can be used
on virtually every computer hardware platform. Originally designed for the Intel
x86 platform, it is now available for Intel, Mac, Sparc, Alpha, embedded devices, and
many more platforms. Linux is a UNIX-like OS that is very stable, reliable, and flexi-
ble. It is used on PCs, professional workstations, servers, routers, and practically
every other computing platform. Linux works well in all these environments, and
because it is multi-user and multi-tasking, it can perform virtually any job or group
of jobs quickly and efficiently. Linux is as powerful as any other operating system,
and most importantly, it is free. Linux was created to be a free alternative to UNIX
and has become a competitor for all operating systems available today. This fact
has enabled Linux to greatly increase its user base, and to be supported and used
by the largest corporations and governments in the world. Because of its open
nature and technical strengths, Enterprise use of Linux is best illustrated by its
large-scale use on the Internet — it powers a majority of Internet applications,
including the Apache Web server. Linux has sprung from humble beginnings to
become a widely used and respected OS on essentially all computing platforms.
Linux is a direct competitor with other high profile operating systems, such as UNIX
and Microsoft Windows.
The origin of UNIX
UNIX got its start when a group of researchers from AT&T Bell Laboratories,
General Electric, and the Massachusetts Institute of Technology worked together
under the Multiplexed Information Computing System, or MULTICS, project in 1968.
AT&T Bell Laboratories researchers Ken Thompson and Dennis Ritchie developed
UNIX with many of the developments of the MULTICS project. UNIX was intended to
be an affordable multi-user and multi-tasking OS, and to help meet those goals,
UNIX was rewritten in 1973 using the C programming language. This allowed the
UNIX OS to become transportable to other hardware platforms without having to
be specifically written for that hardware platform. This ease of transport is still evi-
dent today because versions of UNIX are available for practically every computing
platform, from PC to Supercomputer. As UNIX grew, Bell Labs licensed it to several
users, one of which was the Computer Science department of the University of
California Berkeley, creators of the Berkeley Software Distribution (BSD). The devel-
opment of UNIX over the years at Berkeley, with the support of the Defense
Advanced Research Projects Agency (DARPA), included the TCP/IP networking
034881-6 ch01.F 11/12/01 8:28 AM Page 5
35. 6 Part I ✦ Linux Basics
protocol suite that now powers the Internet. However, these various distributions
of UNIX caused some compatibility problems. To resolve this issue, the Institute of
Electrical and Electronics Engineers (IEEE) developed a new American National
Standards Institute (ANSI) standard called the Portable Operating System Interface
for Computer Environments (POSIX). This standard defines how a UNIX-like system
needs to operate; this standard also details system calls and interfaces. This ANSI
standard resolved most of the compatibility issues and helped UNIX to expand even
further. The longer that UNIX was in distribution and with all the advances that
were being made, however, one thing became increasingly clear: UNIX was being
developed for workstations and minicomputers. This meant that students at major
universities were unable to use UNIX applications on their powerful PCs in the late
1980s and early 1990s. And even though Professor Andrew Tannebaum had created
Minix, a UNIX-like OS, it didn’t have the functionality desired by students like Linus
Torvalds.
Who started Linux?
Linus Torvalds started the Linux project while he was a student at the University of
Helsinki. He worked to create a UNIX-like operating system equipped with more
features than Minix. Torvalds created a Linux kernel that could work with UNIX
applications, and in 1991, he released his first kernel for the Intel x86 platform,
which was widely distributed over the Internet. A kernel is the core of any operat-
ing system, and the Linux kernel was built to work like UNIX but doesn’t use any of
the UNIX code — this is why Linux is not UNIX. The kernel is what allows most soft-
ware to access the hardware that it is installed on. The key to Linux is its kernel
because the kernel allows other programmers to refine it, add to it, and incorporate
most of the features and applications of UNIX. Most standard UNIX applications
have been ported to Linux, such as windows managers, Internet utilities, program
development utilities, and just about every other tool used in computing today. The
ability that other programmers have to work on and improve the Linux kernel is a
result of the unique way Linus Torvalds distributed the kernel itself, which I discuss
in the next section.
GNU and GPL
1.5 Compare and contrast how major Linux licensing schemes work (e.g.,
GNU/GPL, freeware, shareware, open source, closed source, artistic license)
The availability of the Linux kernel is different from the UNIX kernel or even the
Windows kernel because it is distributed under the GNU (which stands for GNU’s
Not UNIX) General Public License (GPL). This license means that the source code is
freely distributed and available to the general public, usually via the Internet. The
GNU GPL is used to ensure that everyone has the ability to distribute copies of, use
portions of, make changes to, or add packages to the software under this license.
The GNU GPL also means that anyone who receives the software — even if they
034881-6 ch01.F 11/12/01 8:28 AM Page 6
36. 7Chapter 1 ✦ Basic Linux Concepts
were charged for it — is protected under the GNU General Public License to have
the same abilities to make changes and distribute the software. The GNU GPL
ensures that no one person or organization can make a change to the kernel with-
out making those changes publicly available. The Free Software Foundation,
through fund-raising, supports the GNU project. Information on the GNU project
can be found at www.gnu.org, where a description of their goals and the different
types of GNU licenses are explained. The GNU GPL is as follows:
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies of this license docu-
ment, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to guarantee
your freedom to share and change free software — to make sure that the software is
free for all its users. This General Public License applies to most of the Free
Software Foundation’s software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by the GNU
Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General
Public Licenses are designed to make sure that you have the freedom to distribute
copies of free software (and charge for this service if you want), that you receive
source code or can get it if you want it, that you can change the software or use
pieces of it in new free programs; and that you know you can do these things. To
protect your rights, we need to make restrictions that forbid anyone to deny you
these rights or to ask you to surrender the rights. These restrictions translate to
certain responsibilities for you if you distribute copies of the software, or if you
modify it. For example, if you distribute copies of such a program, whether gratis or
for a fee, you must give the recipients all the rights that you have. You must make
sure that they, too, receive or can get the source code. And you must show them
these terms so they know their rights. We protect your rights with two steps: (1)
copyright the software, and (2) offer you this license which gives you legal permis-
sion to copy, distribute, and/or modify the software. Also, for each author’s protec-
tion and ours, we want to make certain that everyone understands that there is no
warranty for this free software. If the software is modified by someone else and
passed on, we want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original authors’ rep-
utations. Finally, any free program is threatened constantly by software patents. We
want to avoid the danger that redistributors of a free program will individually
obtain patent licenses — in effect making the program proprietary. To prevent this,
we have made it clear that any patent must be licensed for everyone’s free use or
not licensed at all. The precise terms and conditions for copy, distribution, and
modification follow.
034881-6 ch01.F 11/12/01 8:28 AM Page 7
37. 8 Part I ✦ Linux Basics
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms of this
General Public License. The “Program”, below, refers to any such program or work,
and a “work based on the Program” means either the Program or any derivative
work under copyright law: that is to say, a work containing the Program or a por-
tion of it, either verbatim or with modifications and/or translated into another lan-
guage. (Hereinafter, translation is included without limitation in the term
“modification”.) Each licensee is addressed as “you”.
Activities other than copying, distribution and modification are not covered by this
License; they are outside its scope. The act of running the Program is not
restricted, and the output from the Program is covered only if its contents consti-
tute a work based on the Program (independent of having been made by running
the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program’s source code as
you receive it, in any medium, provided that you conspicuously and appropriately
publish on each copy an appropriate copyright notice and disclaimer of warranty;
keep intact all the notices that refer to this License and to the absence of any war-
ranty; and give any other recipients of the Program a copy of this License along
with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at
your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus
forming a work based on the Program, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all of
these conditions:
a) You must cause the modified files to carry prominent notices stating that you
changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part
contains or is derived from the Program or any part thereof, to be licensed as a
whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you
must cause it, when started running for such interactive use in the most ordinary
way, to print or display an announcement including an appropriate copyright notice
and a notice that there is no warranty (or else, saying that you provide a warranty)
and that users may redistribute the program under these conditions, and telling the
user how to view a copy of this License. (Exception: if the Program itself is interac-
tive but does not normally print such an announcement, your work based on the
034881-6 ch01.F 11/12/01 8:28 AM Page 8
38. 9Chapter 1 ✦ Basic Linux Concepts
Program is not required to print an announcement.) These requirements apply to
the modified work as a whole. If identifiable sections of that work are not derived
from the Program, and can be reasonably considered independent and separate
works in themselves, then this License, and its terms, do not apply to those sec-
tions when you distribute them as separate works. But when you distribute the
same sections as part of a whole which is a work based on the Program, the distri-
bution of the whole must be on the terms of this License, whose permissions for
other licensees extend to the entire whole, and thus to each and every part regard-
less of who wrote it. Thus, it is not the intent of this section to claim rights or con-
test your rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on the
Program.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or distri-
bution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2)
in object code or executable form under the terms of Sections 1 and 2 above pro-
vided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code,
which must be distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third
party, for a charge no more than your cost of physically performing source distribu-
tion, a complete machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium customarily
used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute cor-
responding source code. (This alternative is allowed only for noncommercial distri-
bution and only if you received the program in object code or executable form with
such an offer, in accord with Subsection b above.) The source code for a work
means the preferred form of the work for making modifications to it. For an exe-
cutable work, complete source code means all the source code for all modules it
contains, plus any associated interface definition files, plus the scripts used to con-
trol compilation and installation of the executable. However, as a special exception,
the source code distributed need not include anything that is normally distributed
(in either source or binary form) with the major components (compiler, kernel, and
so on) of the operating system on which the executable runs, unless that compo-
nent itself accompanies the executable. If distribution of executable or object code
is made by offering access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as distribution of the
source code, even though third parties are not compelled to copy the source along
with the object code.
034881-6 ch01.F 11/12/01 8:28 AM Page 9
39. 10 Part I ✦ Linux Basics
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify, sub-
license or distribute the Program is void, and will automatically terminate your
rights under this License. However, parties who have received copies, or rights,
from you under this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the Program
or its derivative works. These actions are prohibited by law if you do not accept
this License. Therefore, by modifying or distributing the Program (or any work
based on the Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying the Program or
works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the
recipient automatically receives a license from the original licensor to copy, dis-
tribute or modify the Program subject to these terms and conditions. You may not
impose any further restrictions on the recipients’ exercise of the rights granted
herein. You are not responsible for enforcing compliance by third parties to this
License.
7. If, as a consequence of a court judgment or allegation of patent infringement or
for any other reason (not limited to patent issues), conditions are imposed on you
(whether by court order, agreement, or otherwise) that contradict the conditions of
this License, they do not excuse you from the conditions of this License. If you can-
not distribute so as to satisfy simultaneously your obligations under this License
and any other pertinent obligations, then as a consequence you may not distribute
the Program at all. For example, if a patent license would not permit royalty-free
redistribution of the Program by all those who receive copies directly or indirectly
through you, then the only way you could satisfy both it and this License would be
to refrain entirely from distribution of the Program. If any portion of this section is
held invalid or unenforceable under any particular circumstance, the balance of the
section is intended to apply and the section as a whole is intended to apply in other
circumstances. It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any such claims; this
section has the sole purpose of protecting the integrity of the free software distri-
bution system, which is implemented by public license practices. Many people
have made generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that system; it is up to
the author/donor to decide if he or she is willing to distribute software through any
other system and a licensee cannot impose that choice. This section is intended to
make thoroughly clear what is believed to be a consequence of the rest of this
License.
8. If the distribution and/or use of the Program is restricted in certain countries
either by patents or by copyrighted interfaces, the original copyright holder who
places the Program under this License may add an explicit geographical
034881-6 ch01.F 11/12/01 8:28 AM Page 10
40. 11Chapter 1 ✦ Basic Linux Concepts
distribution limitation excluding those countries, so that distribution is permitted
only in or among countries not thus excluded. In such case, this License incorpo-
rates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the
General Public License from time to time. Such new versions will be similar in spirit
to the present version, but may differ in detail to address new problems or con-
cerns. In essence, GNU is an attempt to guarantee certain rights for both users and
developers. This sets Linux apart from other most operating systems in the market
today is that Linux is Open Source.
Each version is given a distinguishing version number. If the Program specifies a
version number of this License which applies to it and “any later version”, you have
the option of following the terms and conditions either of that version or of any
later version published by the Free Software Foundation. If the Program does not
specify a version number of this License, you may choose any version ever pub-
lished by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose
distribution conditions are different, write to the author to ask for permission. For
software which is copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our decision will be
guided by the two goals of preserving the free status of all derivatives of our free
software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WAR-
RANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING, THE COPYRIGHT HOLDERS
AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU-
LAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRIT-
ING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUEN-
TIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
034881-6 ch01.F 11/12/01 8:28 AM Page 11
41. 12 Part I ✦ Linux Basics
Understanding Open Source
1.5 Compare and contrast how major Linux licensing schemes work (e.g.,
GNU/GPL, freeware, shareware, open source, closed source, artistic license)
The GNU GPL makes Linux Open Source because it is an acceptable license for
Open Source Software. Open Source follows a similar path of the GNU GPL, but it
also has many differences. Even though the Open Source Initiative strictly adheres
to GNU GPL, it is not a specific license; rather, the Open Source Initiative supports
the various types of open source licenses that are available. The idea behind the
Open Source Initiative (OSI) is to gather corporate support behind open source.
Companies that want to participate in Open Source are allowed to write their own
license or use the GNU GPL and submit the license to the OSI for certification. This
opens the door for all Open Source software and guarantees not only source code
access but also follows the Open Source Definition. Full information on the Open
Source Initiative can be found at www.opensource.org. The Open Source Definition
is as follows:
✦ Free Distribution — The license shall not restrict any party from selling or giv-
ing away the software as a component of an aggregate software distribution
containing programs from several different sources. The license shall not
require a royalty or other fee for such sale.
✦ Source Code — The program must include source code, and must allow distri-
bution in source code as well as compiled form. Where some form of a prod-
uct is not distributed with source code, there must be a well-publicized means
of obtaining the source code for no more than a reasonable reproduction
cost — preferably, downloading via the Internet without charge. The source
code must be the preferred form in which a programmer would modify the
program. Deliberately obfuscated source code is not allowed. Intermediate
forms such as the output of a preprocessor or translator are not allowed.
✦ Derived Works — The license must allow modifications and derived works,
and must allow them to be distributed under the same terms as the license of
the original software.
✦ Integrity of The Author’s Source Code — The license may restrict source-
code from being distributed in modified form only if the license allows the dis-
tribution of “patch files” with the source code for the purpose of modifying
the program at build time. The license must explicitly permit distribution of
software built from modified source code. The license may require derived
works to carry a different name or version number from the original software.
✦ No Discrimination Against Persons or Groups — The license must not dis-
criminate against any person or group of persons.
✦ No Discrimination Against Fields of Endeavor — The license must not
restrict anyone from making use of the program in a specific field of endeavor.
For example, it may not restrict the program from being used in a business, or
from being used for genetic research.
034881-6 ch01.F 11/12/01 8:28 AM Page 12
42. 13Chapter 1 ✦ Basic Linux Concepts
✦ Distribution of License — The rights attached to the program must apply to
all to whom the program is redistributed without the need for execution of an
additional license by those parties.
✦ License Must Not Be Specific to a Product — The rights attached to the pro-
gram must not depend on the program’s being part of a particular software
distribution. If the program is extracted from that distribution and used or
distributed within the terms of the program’s license, all parties to whom the
program is redistributed should have the same rights as those that are
granted in conjunction with the original software distribution.
✦ License Must Not Contaminate Other Software — The license must not place
restrictions on other software that is distributed along with the licensed soft-
ware. For example, the license must not insist that all other programs dis-
tributed on the same medium must be open-source software.
Understanding Closed Source
In Closed Source software, such as Microsoft products, the creators are the only
ones who can access and modify the software source code. Of course, this also
means that they are the only ones who are authorized to refine, add to, and fix bugs
in the software. This is the most restrictive of the software licensing methods.
Selecting Closed Source as the licensing method often draws the wrath of GNU GPL
and Open Source supporters. The Open Source and GNU GPL supporters see
Closed Source as a restriction that should be lifted to allow anyone to fix, improve,
or change the software for the benefit of the software and its community of users.
Companies that select Closed Source as the licensing method for the software that
they release are often trying to protect “intellectual property,” and therefore see lit-
tle benefit to opening the software to others. This is a major philosophical differ-
ence between Closed Source and Open Source software licenses.
Understanding Artistic License
Artistic License takes a different philosophical approach. It is different from Open
Source or GNU GPL because Artistic License is a more restrictive license. Artistic
License requires that any modifications to a software package remain in some con-
trol of the Copyright Holder. This defeats the reason for Open Source and GNU GPL
because if the Copyright Holder does not like the direction (even if it improves the
software) the Copyright Holder can stop the changes. Perl is a good example of
Artistic License and of the issues that this license can cause.
Is Freeware really free?
Freeware is software that the creator or copyright holder gives away for no charge.
This may seem to indicate that the software is not protected by a license. This
impression, however, is not accurate because Freeware, even if it is free of charge,
is often covered by one of the many licensing methods. Sometimes companies or
034881-6 ch01.F 11/12/01 8:28 AM Page 13
43. 14 Part I ✦ Linux Basics
individuals will release software as Freeware but control the software under a
Closed Source license. This may seem strange, but consider the freeware as a ser-
vice to introduce users to a company or individual’s software. The company or indi-
vidual may use the same core programming to create all of the software that they
offer, so they may not want to release the code under an Open Source license. Thus,
Freeware has no charge, but it isn’t always free.
Is Shareware never free?
Shareware is software that a creator has decided to give away with a string
attached. The attached string is that if you want to continue using the software, you
must send a payment to the creator. Some creators use the honor system, but most
shareware is designed to turn itself off after a certain amount of time. Considering
this situation, you may wonder if shareware has to be Closed Source. The answer is
no, because it can be licensed under any of the licensing methods; however, it does
seem to make more sense to make shareware Closed Source in order to limit the
distribution.
A comparison and contrast of licensing methods
Naturally, you should make comparisons when determining which licensing method
to select. Keep the following points in mind when choosing a licensing method:
The GNU GPL is restricted to the exact terms of the published GNU GPL and can’t
be changed. This is more restrictive than some software authors desire.
The Open Source Licensing method has the GNU GPL as a subset, but it also allows
software authors the capability to write their own license, as long as that license
follows the Open Source Initiative standards.
Closed Source Licensing is used for any software in which the copyright holder
doesn’t want to share the source code of a software package in any way. This is the
usual method of licensing by commercial companies and prevents others from
using the code to customize the software for redistribution.
This doesn’t mean that Closed Source software is never customized and redis-
tributed. Recently, two of the most popular computer games have had their cores
(or engines) licensed to other companies for customization and redistribution as
several new games. This is an excellent way for one company to make more
money off of a software program while the purchasing company saves develop-
ment cost.
Artistic Licenses are generally used by software authors who want to give others
limited access to the code of a software program. In fact, this is often the case when
software authors want to prevent software from being altered too dramatically from
the original code.
034881-6 ch01.F 11/12/01 8:28 AM Page 14