- •About the Author
- •Credits
- •Foreword
- •Preface
- •Acknowledgments
- •Contents at a Glance
- •Contents
- •Introduction to Linux
- •Installing Debian
- •Choosing a GUI
- •Networking
- •Setting Up for the Internet
- •Applications
- •Essential Tools
- •Multimedia
- •Games
- •Scripting
- •Shells
- •Linux Kernel
- •Hardware
- •Backups
- •Security
- •Firewall
- •Web Server
- •FTP Server
- •File Server
- •Linux Commands
- •Index
- •GNU General Public License
- •CD-ROM Installation Instructions
Introduction to Linux
Welcome to the Debian GNU/Linux Bible where you can find hints, tips, and helpful instructions on most
areas of this robust operating system. As you begin to learn more about this distribution of the Linux operating system, I’m sure you will find that you have made an excellent choice. Debian GNU/Linux is one of the best-kept secrets from the general public.
Note In case you were wondering, GNU stands for GNU’s Not UNIX, which still doesn’t answer the question of the definition of GNU. That’s the best I can come up with.
This chapter covers the background of Linux, what makes it special, and how Debian compares to other operating systems. You will discover the true meaning behind free software and why it is so important to Debian.
Before you begin to read about the origins of this great operating system, I open with a definition of the operating system. This helps to define how you look at the accomplishments described later.
Understanding the Role of the
Operating System
The operating system controls the interaction between hardware and the software applications. The hardware consists of the processor, hard drives, video cards, sound cards, and more. Each processor has built into it a language that only it understands, plus each manufacturer creates a different language for its processor. For instance, an Intel x86 processor uses a different internal language than, say, a Motorola 68000 processor. Therefore, any software must be complied (converted into the
C 1H A P T E R
In This Chapter
Understanding the role of the operating system
Understanding the history of Linux
Considering the story behind Open Source
Comparing Linux to other operating systems
Using the Debian
Distribution
4 |
Part I Getting Started |
processor language) or customized for the processor (often referred to as the computer platform). Some of the platforms include:
x86 (Intel [386, 486, Pentium, Pentium II, Pentium III, Celeron], AMD [K6-2, Athlon, or others equivalent to the Intel line])
Alpha (Was DEC, Now Compaq)
Power PC, also known as PPC (Motorola/IBM Power PC)
M68k (Motorola 68000 series)
Sparc (Sun Microsystems’s SPARCstation)
The core component to the operating system is called the kernel in UNIX and UNIXlike operating systems. The kernel communicates with the basic computer hardware like the microprocessor, memory, and device controllers. All interaction between the hardware and any programs must be negotiated through the kernel. The kernel takes care of translating the requests into the form the particular device speaks. This includes everything from drawing a picture to saving a file to a floppy to printing a document. In addition to the kernel, the user interface, device drivers, file system, and system services complete the whole operating system and make it functional for someone to use.
The user interface makes it possible for the individual to interact with the computer to issue commands, launch programs, and generally control the computer. This usually starts as a command-line interface and later becomes some kind of graphical interface. One example of the interface is the shell which allows commands to be typed in and the output gets displayed to the screen in text form. Chapters 4 and 14 cover the graphical interface and shell interface respectively.
The device drivers allow the kernel to talk to the various devices, such as hard drives and modems, which are connected to the computer. Each hardware device speaks its own language, and the operating system must be capable of interacting with it. In order for a specific piece of hardware to be used, like the mouse, hard drive or sound card, the corresponding driver must be installed for it to get used. See Chapter 17 for more information about hardware or Chapter 15 for the kernel details.
The information for the operating system — such as programs, data, and such — gets stored to a disk. The filesystem sets the method that the information gets stored. Different operating systems use different methods of storing their data. For instance Windows 3.1 uses File Allocation Tables (FAT) fir its filesystem. Newer versions of Windows like 95 and 98 use a more advanced version called FAT32. And Windows NT uses NTFS for its filesystem. Not all of these filesystems are compatible with all operating systems, even among the Windows family. Windows NT can read FAT and NTFS, but not FAT32. Like wise, Windows 95 and 98 can read FAT and FAT32, but not NTFS. Linux uses EXT2, but can read FAT and FAT32 using the VFAT driver. You can learn more about this scattered through the book.
Chapter 1 Introduction to Linux |
5 |
When the computer starts up, some functions, features, or services start to manage the system. For instance, when Linux first starts, it loads the filesystems, network interfaces, and any background services known as daemons.
When the filesystem loads, it assigns what drives get used. The network interface gets initialized and configured to communicate on the network.
Note A daemon is a program that runs in the background without anyone being aware of it until it is needed. (This is referred to as services in the Windows NT world.) For instance, a Web server (Chapter 21) runs in the background because it was designed to work with out human intervention.
Now that you have a better understanding of what an operating system is, you can move on to see what Linux is all about.
History of GNU/Linux
Free operating systems are not a new concept in the computer world,. (The academic versions of UNIX, Slackware, and FreeBSD come to mind.) Then a student of the University of Helsinki, Linus Torvalds announced in 1991 that he had created a very experimental operating system core called a kernel, based on a clone of UNIX called Minux. This new operating system kernel later became known as Linux. Torvolds chose this UNIX variant because of the well-respected stability, design and functionality of the UNIX operating system developed by Bell Laboratories.
This new operating system kernel was refined for maximum performance on the Intel 386 microprocessor, which made this new Linux kernel platform specific. This generated criticism from some corners of the UNIX software world. Traditionally, UNIX was independent of platform, meaning that you could use the softeware with different computer processors without much trouble. This didn’t stop Torvalds from continuing to develop his kernel. His efforts eventually led him to the free software community where programmers got behind his efforts and contributed to the new kernel.
However, long before Torvalds started work on his Linux kernel, Richard M. Stallman left his job at the MIT Artificial Intelligence Lab to develop a UNIX-like operating system. He formed the Free Software Foundation and developed the GNU General Public License (GPL). Stallman began working on various software programs for his GNU operating system project. (By the way, GNU is pronounced with a hard G, ga-nu) By 1991, he had most of the software pieces of the GNU operating system complete with the exception of the kernel. In 1990, he started working on the kernel and named it HURD (Hird of UNIX-Replacing Daemons). Hird stands for Hurd of Interfaces Representing Depth. According to an interview with Stallman, people interested in the GNU project began to put Torvald’s Linux kernel with Stallman’s GNU operating system to form the GNU/Linux operating system.
Note The HURD project is a rewrite of the UNIX kernel. The difference between this kernel and others is that it has an object-oriented structure that enables you to change, add, or remove components without major rewrites of the entire kernel. Currently, HURD only works with the Intel i386 and the last official release was
6 |
Part I Getting Started |
back in 1997. However, it remains an active project. Had the Linux kernel been available in 1990, Stallman says they would not have started their own.
Note In truth, from its adoption as an operating system, the rightful name of Linux is really GNU/Linux. Linux is really only the kernel (the core component) and GNU contains the supporting applications around the kernel that make it functional. These supporting applications include the user interface and all other applications (editors, Most refer to GNU/Linux as simply Linux, which you may even see in this book from time to time for the sake of brevity. Please understand I mean no disrespect to the developers.
Linux versus Other Operating Systems
When Bill Gates, founder of Microsoft, made his deal with IBM to include his disk operating system (DOS) with IBM personal computers, his goal was to put a computer in every home. Today many homes do have personal computers (PCs), and most use some type of Microsoft operating system. Until recently, a Microsoft operating system was your only preinstalled choice when purchasing a new personal computer. Now, many name brand PC manufacturers — such as Dell, Compaq, and others — offer other operating systems. Table 1-1 shows a list of many of the operating systems.
Table 1-1
Popular PC operating systems and platforms
Operating System |
Platform |
|
|
Linux (Debian) |
Intel x86, PowerPC, M68k, Alpha, Sparc, ARM |
|
|
Windows 95/98 |
Intel x86 |
|
|
Windows NT/2000 |
Intel x86, PPC |
|
|
MacOS |
PPC |
|
|
Be OS |
Intel x86 |
|
|
OS/2 Warp |
Intel x86, Alpha |
|
|
Solaris |
Sparc, Intel x86 |
|
|
As you can see from Table 1-1, no other operating system can be used with nearly as many platforms as Linux can. Plans are in the works by Linux developers to include others, such as sparc64, MIPS, and PS-RISK. Development teams of programmers from all around the world are credited for this outstanding growth.
Even though the Windows 95/98 operating system gained vast popularity due to its professed user friendliness, GNU/Linux has made steady improvements to reach the same level of user friendliness. In 1999, the growth rate seen by Linux exceeded
Chapter 1 Introduction to Linux |
7 |
the growth of Windows NT. Despite the strong marketing power, available resources, and influence of the big boys, the cheap (by price only) operating system called Linux is taking the world by storm.
Table 1-2 lists some significant differences between Linux and the other operating systems:
|
Table 1-2 |
|
Benefits of Linux |
Benefit |
Description |
|
|
Costs nothing |
Linux is the only operating system that costs nothing. All others listed |
|
have some purchasing fee ranging from just under $100 to several |
|
hundred dollars. For a business with several servers and |
|
workstations, this can add up fast. |
|
|
Downloadable |
With a fast Internet connection, you can have your operating system |
|
available in a short period of time. No need to order it, have it |
|
shipped, or visit a local computer dealer to get the copies you need. |
|
|
Freely distributed |
Make as many copies of Debian GNU/Linux as you want or need. |
|
There is no copyright with GPL software except that the source code |
|
must be included. Other operating systems require a purchased |
|
license for each installation. |
|
|
Built by volunteers |
Other operating systems are company creations in which all the |
|
work is either contracted or programmed in-house. Volunteers make |
|
up the primary programming body of Linux. Some companies |
|
contribute to the cause for the benefit of the whole. This volunteer |
|
principle contributes to its overall stability. |
|
|
Source code available |
When you buy an operating system off the shelf, you only get the |
|
compiled version ready to run straight out of the box. If there is a |
|
problem or a minor change you want to make, you have no chance |
|
to make it because of no available source code. Linux encourages |
|
individual adjustments, modifications, and fixes because the source |
|
is always available. As a result of the available source code, fixes to |
|
problems can take place literally overnight. |
|
|
Reliable |
Though this may not be unique to Linux, it is important nonetheless. |
|
Linux is very stable as are some of the other operating systems. I |
|
have known Linux servers to run without needing to be restarted for |
|
months at a time (and then only for hardware maintenance). In |
|
contrast, some Windows NT servers need to be restarted every day |
|
to ensure their reliability. |
|
|
Flexible |
With the vast numbers of programs available for Linux, its uses can |
|
range from a single task as a monitor, to uses as a workstation for |
|
calculating advanced mathematical formulas or graphics. You can |
|
use Linux as an Internet router, firewall, proxy, Web server, or mail |
|
server that is as powerful as any on the open market. |
|
|
8 |
Part I Getting Started |
The Word on Free Software and Open Source
The Free Software Foundation believes, of course, that software should be free. This includes the source code for the executable programs. When they say free, they mean it.
The foundation, which developed the GNU General Public License (GPL), promotes sharing of free software (including the source code). The purpose of this is to allow the programming community to make changes to the code. According to the GPL, no software that claims this license can be distributed without the source code. When source code is included, the programming community can respond to defects, bugs, and cracks faster. A fix for a commercial operating system can take up to six months to be released, compared to a few days in the Linux world.
Just because software is free and the source gets included doesn’t mean that it’s a free-for-all on the program. Once a developer releases GPL software, any licensing changes made to that software must be made with the consent of the author.
However, you can freely distribute, modify, and use it. Although most software released with Debian uses the GPL and is free, some software discussed in this book and found elsewhere is not free as it is sold commercially. However, most software for Linux is free.
The Open Source community differs slightly from the Free Software movement, although both desire to see freely available software. The Open Source movement is less concerned with whether anyone makes a profit along the way, but more concerned with the distribution of free software. Eric Raymond cofounded the Open Source Software Group out of a concern that businesses weren’t getting the word. As a result of his efforts, some companies have adopted the Open Source philosophy. One such company, Cygnus Solutions, produced the GNUPro Developers Kit as an Open Source product. Red Hat acquired this product, which is now called GNUPro ETS.
Having corporations involved in the development and promotion of Linux helps everyone. Companies bring training, certification, and support to an otherwise hobby operating system. Without this kind of support, many people (and companies) stay away from a product to avoid its potential failure of an unknown future. As more companies get behind a system — for better or worse — it gains more credibility in the minds of businesses. Therefore, having companies involved in the development of Linux is a good thing.
What’s So Special about GNU/Linux?
Stallman’s dream of having an operating system free from commercial purse strings came true with the completion of the kernel by Torvalds. As the community of programmers grew, so did the draw to GNU/Linux. The metamorphosis of the operating system grew to gain the attention of the world.
Chapter 1 Introduction to Linux |
9 |
More and more people started joining the Linux movement by adopting GNU/Linux as their operating system of choice. Many migrated to it looking for a stable environment from which to create programs, while others sought something that wouldn’t crash when performing simple daily tasks like word processing. Both groups of users were pleasantly surprised with GNU/Linux.
With the popularity of GNU/Linux increasing, some programmers created special distributions of the operating systems by adding in their own special programs as enhancements. You can easily obtain some of these systems, while others encourage the purchase of their packages. Still others include software at a price, which dilutes the openness of the source. Table 1-3 lists some of the more popular Linux distributions. All can be purchased from store (except Debian) or downloaded from a site like www.linuxiso.org where all you have to do is burn the distribution image to a CD for you own copy.
|
Table 1-3 |
|
Linux distributions and Web sites |
|
|
Distribution |
Web Site |
|
|
Debian GNU/Linux |
www.debian.org |
|
|
Red Hat |
www.redhat.com |
|
|
SuSE |
www.suse.org |
|
|
Caldera OpenLinux |
www.caldera.com |
|
|
Slackware Linux |
www.slackware.com |
|
|
Linux-Mandrake |
www.mandrake.com |
|
|
Corel Linux |
linux.corel.com |
|
|
Storm Linux |
www.stormix.com |
|
|
Turbo Linux |
www.turbolinux.com |
|
|
Some of these distributions listed in Table 1-3 were created from other distributions. For instance, Linux-Mandrake uses a Red Hat base while Corel and Storm Linux both originated with Debian. Surprised? Even though some of the distribution originated from other distributions (like Linux-Mandrake originated from Red Hat), each one adds something a little different to the mix — a graphical installer, special configuration tools, or even hardware detection software.
10 |
Part I Getting Started |
Understanding the Debian Distribution
One of the oldest distributions of Linux, Debian GNU/Linux has an awesome reputation. At the heart of this distribution is a faithful community of programmers, all dedicated to advancing free software. This is the purest in the sense of noncommercial and most stable flavor of Linux because all base components are community created, community supported, and no-strings-attached free. There are over 500 developers working together from around the world to put out the latest version. Debian is the oldest distribution that does not have corporate strings attached. However, because this distribution is volunteer driven, the releases tend to be slow. This slowness could be considered a drawback, but in my opinion, it’s worth the wait.
Tip |
If you are interested in getting connected to the Debian community, check out one |
|
of the many mailing lists at www.debian.org/MailingLists/subscribe. If |
|
you are interested in becoming a Debian Developer, subscribe to one of the devel- |
|
oper lists and become known. Official Developers must be invited so don’t expect |
|
to become one overnight. |
Note |
To date of the known Linux installations, Debian makes up 21 percent compared |
|
to Red Hat at 29 percent (as reported by the Linux Counter at counter.li.org). |
|
This is remarkable because no marketing teams, corporate strategies, or distribu- |
|
tion channels promote the Debian distribution. |
How did Debian get its start? In 1993, Ian Murdock attempted to create a distribution that combined the Linux kernel with GNU. In the process, the concept of packages developed. A package is a collection of all the compiled components needed to make a program work. Each package includes information about install location, configuration and any other packages it need to use. These packages were organized to allow others to contribute to the distribution. Table 1-4 shows the timeline for this distribution.
Table 1-4
Time Chart for Debian
Release Date |
Name |
Contributors |
|
|
|
Nov 1995 |
First Release |
60 |
|
|
|
Jun 1996 |
Buzz |
60 |
|
|
|
Dec 1996 |
Rox |
120 |
|
|
|
Jul 1997 |
Bo |
200 |
|
|
|
Jul 1998 |
Hamm |
400+ |
|
|
|
Mar 1999 |
Slink |
450+ |
|
|
|
Aug 2000 (approximate) |
Potato |
500+ |
|
|
|
Chapter 1 Introduction to Linux |
11 |
In 1996, Ian stepped down as the Debian leader and started up Progeny Linux Systems, an Open Source company that to offer a product called Linux NOW to organizations with large numbers of computers. This company’s goal is to take a network of computers and make it function as if it were one computer. Progeny chooses to use the Debian GNU/Linux distribution instead of creating its own highly customized flavor. It also plans on adding to Debian the same easy-to-use features that the commercial distributions enjoy. Progeny Linux Systems is completely behind the Debian distribution and wants to see it become as competitive as the commercial versions.
With over 4,000 packages available and six complete ports to different platforms, Debian is by far the largest distribution. Debian GNU/Linux is not only the largest distribution, but it is also the most tightly guarded in terms of being freely distributed. No software that contains licensing variants other than the terms found in the Debian Free Software Guidelines — which plainly states the core values of its development model — are allowed. The Debian developers work hard to achieve zero down time from installations, configurations, and upgrades and Debian is the only distribution that comes close. Debian’s package-management system seamlessly performs complete, in-place upgrades without the need for system restarts.
Even though this chapter mentions some important names associated with Debian, the real heart and soul behind Debian is the community. These men and women spend their free time working on the code with an understanding that the software is shared freely around the world. The future of Debian rests on the shoulders of these people. Are you ready to become one?
Summary
Debian GNU/Linux is one of the best-kept secrets, found mostly among developer communities, hobbyists, and academia. Though Debian isn’t destined for the fasttrack commercial distribution, there is a strong movement just the same to make Debian a viable alternative to compete with those other distributions.
The future of Debian is bright. Expect it to include distributions for more platforms as time passes. Debian doesn’t have a corporation marketing it, but that doesn’t mean that there is nothing worthwhile about it. Actually, because a corporation is not pushing it along, it is one of the strongest, most stable Linux distributions available.