Everyday Linux
Authors: Kathy Miles, Ethan Metsger
Venue:  (2001)

From the Book:PREFACE: PrefaceIntroducing a book is always difficult for me. There's a lot to cover here, after all-Who are the authors? What's this "Linux" everyone keeps talking about? What on Earth is "Open Source"? Why should I care? These are just a few questions that ran through my head as I thought about how to write this introduction. Ideally, the introduction will answer these questions and a few more besides, while providing you with a basis for the use of the book.Who Are the Authors?Ethan Metsger is an undergraduate student at the Ohio State University, pursuing a Bachelor of Science degree in the field of Computer Science. He has been working with UNIX for five years and Red Hat Linux for nearly two. Ethan is handling the writing of the more technical aspects of the system-how to install the software and get it configured to your liking.Kathy Miles is a columnist for the Daily Local News in West Chester, Pennsylvania, writing about various elements of astronomical interest. She has been publishing various articles and papers for more than ten years. She has been working with Linux in various forms for four years and UNIX for the past six or seven. Kathy is writing about the applications that you can get with Linux.We met while volunteering at a community-based Internet provider. We've been working together in various capacities for nearly four years, and when the opportunity came along to write a book together, we jumped on it.What Is Linux?Linux is an operating system. An operating system is the software that runs your computer and controls how various elements of it act. For instance, an operating systemrecognizesthat you can pass data between your computer and monitor or printer, and allows the programs on your computer to do so.Most personal computers today use the Windows operating system, created and maintained by Microsoft Corporation. The next contender is the Macintosh OS, or MacOS, though it owns only a small portion of the market share.More recently, with the advent of better marketing by Apple Computers, the evidence brought against Microsoft indicating actions that violate United States anti-trust laws, and the activities of the Open Source community, Microsoft has experienced more competition, much of which is vested in the form of the Linux operating system.Most Windows users I'm acquainted with are frustrated with using Windowsits programs are mammoth, often expensive, and they frequently crash. It is an industry expectation that each version of Microsoft will have enough bugs to warrant a "second edition" or some other program to patch the holes in the system. And with recent e-mail viruses targeting Windows programs like Microsoft Outlook, users are more aware than ever that security is not Windows' strong point.Enter Linux.Why Linux?Some people pick up Linux out of curiosity. Others are looking for an alternative operating system to Windows or the Macintosh Operating System. Some hear about it from friends, like I did, or become familiar with the name while doing some computer work. Still others have heard of it through the news. And a few are still so jealous of Bill Gates they hope to deny him a small portion of his fortune by switching.But the question remains: Why? Why Linux? Why does it generate so much excitement? Perhaps more important, why should I buy or download it? After all, it takes time to learn about a new operating system, and UNIX-based operating systems have a reputation for being difficult to use and understand. You buy Linux because you're looking for a better product, an operating system that you can leave running for weeks on end if necessary, because you like having support and access to a lot of it. You buy Linux because it has a plethora of applications that match and sometimes outdo their commercial counterparts. Linux is powerful, fully featured, and reliable. It is less susceptible to viruses and outside attack than many other personal computer operating systems. It's inexpensive, both in maintenance and support. If you need help, you can find it. And the reputation of being difficult to use and understand is outdated-Linux is incredibly easy to use, and users of Windows and the Macintosh OS will have little to no trouble adapting to the new environment.These are just a few of the advantages of running Linux. To understand how they all developed, knowing the history of Linux is helpful. And the history also explains how the phenomenon known as Open Source appeared. (This is more or less fundamental to the existence of Linux.)The History of LinuxWe should affix a subtitle to this section: "In Brief." The history of Linux is relatively long and takes almost as many turns as the back roads of rural America. However, some background is necessary in order to understand why Linux is important and how it has come to generate so much excitement in the computer world (and now, in yours).Linux's Predecessor, UNIXLinux is a form of UNIX, created by Linus Torvalds. UNIX has existed for over thirty years. It was created in Bell Laboratories in 1969 by Ken Thompson and Dennis Ritchie as a successor to the multi-user operating system Multics.UNIX is a unique operating system for a number of reasons. First, because it is coded in the C programming language (also developed by Thompson and Ritchie). All operating systems are written in a programming language, usually assembly (though this is changing). The lower the level of the programming language, that is, the closer the instructions are to the machine language of the computer, the less portable the operating system is. This means that it's harder to "port" the operating system to another computer type.The C programming language is a high-level language, which makes the UNIX operating system (which is programmed in C) very portable. Any computer with a C compiler can take the source code for the operating system and compile it for use on their own computer. This is usually the method for updating the core components of the UNIX operating system, known as the kernel. The process of upgrading your present version of UNIX (or Linux, as is more likely the case) to the most recent usually involves recompiling the kernel.The fact that this is written in the C programming language also means that it is more easily changed than if it were written in assembly or machine language. The definition of a high-level programming language is that it is easier for the programmer to understand; it's a "higher level" than the machine code. Lower-level languages are more difficult to understand. That UNIX and its clones, such as Linux, are written in a high-level programming language is vitally important to the development of the Open Source Initiative and Linux itself.After the wonderful portability of UNIX comes its devotion to the principle that programs should perform one task only; if multiple tasks need doing, string them all together. This is accomplished by the use of shell scripting or piping (see Chapter Eight). This principle of coding is very important, because it keeps the code relatively small and uncomplicated, allowing for fewer errors and other malfunctions. As a result, UNIX is a very stable operating system, given to few problems.Since UNIX is a multi-user operating system, it has been used in a variety of capacities, many of which require low-maintenance systems. (Have you ever thought what would happen to your Internet Service Provider if it was in continual need of maintenance? What if it suddenly froze for no particular reason? Your telephone service likely depends on a series of computers running UNIX or a UNIX clone. The operating system is obviously reliable enough to keep your phones up and running.) The design of UNIX has proven to be quite reliable.So Why Didn't UNIX Catch On?Actually, it did. UNIX has been a major force in many capacities (both commercial and educational) almost since the time of its inception more than thirty years ago. However, UNIX was quite impractical for the home user due to the fact that it was notoriously difficult to use and understand.It has been said that UNIX programmers were too lazy to create commands more than four letters long, though the reality of the matter is that memory restrictions prevented them from making overly complicated command names. This is why there is such a disparity between commands of yesterday and today. Compare "ls"a command that will list filesand "traceroute"a command that will print the route from one host to another. Nonetheless, commands were still less than intelligible.Besides this problem, by the time personal computing was a force, UNIX was too expensive for a single user. Software vendors hiked prices up, driving consumer demand down. In addition, the source code, once openly distributed among universities, was now closed to the public. These forces combined to drive up the price.Combine the cryptic commands with a less than desirable price tag, and you can see why UNIX wasn't too popular with the personal computing world despite its many strengths.This opened the door for Microsoft in the home computing market. First came MS-DOS, which was more or less a UNIX knockoff with a few different filesystem conventions. The major difference between MS-DOS (the "Microsoft Disk Operating System") and UNIX was that UNIX was designed for multiple users and MS-DOS was not. UNIX tended to be far more secure than MS-DOS, but the multi-user system and the costs associated with using UNIX gave Microsoft the upper hand. MS-DOS would go on to be the core of the Windows operating system. It remains so to this day in one form or another. Besides this, UNIX at the time was not intended to be used in a personal computing environment-it was much more commercially oriented.At this point something should be said about Macintosh and Apple computers. We're building up to Microsoft's eventual takeover of the home computing industry. We have already accounted for the failure of UNIX to make inroads into homes. But Microsoft had (and still has, regardless of its diminished capacity) competition vested in the form of Apple Computers.Apple computers tended to be better than the AT or XT clones in the "good old days." Unfortunately, this meant that they were also more expensive. Money drives the market, as they say, and this is no exception. Apple was unable to gain a foothold among common users because of the price tag involved in using an Apple or Macintosh computer.When the Macintosh Operating System (MacOS) came out, it brought with it a new level of usability. This is Steve Jobs' contribution to the computer industry. Users could interact using a windowed system and a mouse. MacOS brought new meaning to the term "user-friendly." During this time, however, Microsoft had noted the achievements of the Macintosh operating system and developed them for itself. This eventually took shape in the form of Windows, which quickly catapulted to the head of the operating system race, at least in the personal computing environment. This was mostly due to marketing. Bill Gates did a better job of selling his operating system than Steve Jobs (CEO of Apple Computer) did, even though Windows was less than original.As UNIX continued to dominate the server and mainframe aspects of the computing world, Microsoft began developing products like Windows NT to compete with UNIX. While NT has gained some ground, flirting with a significant portion of the server market, UNIX still runs a majority of the computers involved in the Internet and other server-related activities all over the world.It is only lately, with the development of concerns about Microsoft's monopoly status and the demand for more reliable and inexpensive personal computing equipment, that UNIX has begun to take strides in the personal computing world. This has come about with the advent of the Open Source Initiative and Linux.This discussion of various operating systems has left out a number of details. I have sought to establish here the causes for the present make-up of the operating system world. There have been other attempts at breaking into the commercial operating system business, such as those by OS/2 and OS/2 Warp, BeOS, and others. However, the computing world today runs on essentially three operating systems: Microsoft Windows, MacOS, and UNIX (and the derivatives thereof).The Development of LinuxThe roots of Linux stem from an operating system known as MINIX, developed by a Dutch professor named Andrew Tanenbaum. Tanenbaum developed MINIX mostly for university students who needed to understand the workings of an operating system. By this time, UNIX was no longer a university novelty, and students were being denied the access to UNIX that their predecessors had.Andrew Tanenbaum's MINIX allowed people the chance to learn about coding and understanding an operating system. To that end, all twelve thousand lines of the source code were available to those people who purchased his book, Operating System. Having the source code allowed computer science students, programmers, and even regular computer users to understand and tinker with the programs that ran their computers.One of these people was Linus Torvalds, a student at Helsinki University. He liked to test systems, to find their limits and press them further, and he needed a professional operating systemone like UNIXto do it. MINIX, unfortunately, was less a professional operating system and more a teacher's tool for students. And the GNU Project (headed up by Richard Stallman) was just getting underwayits production of an operating system was still at least a few years away.So Linus decided to create an operating system of his own. Thus Linux was born. It took several twists and turns before stabilizing, and by this time the GNU Project had developed the GNU Public License (the GPL), which works much like the Open Source model. Linus released Linux under the GPL, and support for it climbed astronomically.What Is Open Source?Because the concept of Open Source is largely responsible for the evolution of UNIX into a personal computer platform, it is important that you understand itit's the reason that you're reading this book.Open Source is the term given to software written under the conditions of the Open Source license, which provides several stipulations for releasing software under the Open Source model. This is known as the Open Source Definition (OSD). The precise definition can be found at the Open Source Initiative's web site, which is listed in the resource list at the back of the book.A few of its provisions should be included here so that you can understand the significance of the Open Source Initiative (OSI).The first requirement of the OSD is that each open-source software package must be freely redistributable. This does not mean that you are not allowed to sell your software, but that you may not restrict any other party from "selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources" (OSI web site).What this requirement does is place "long-term gains" ahead of "short-term sales dollars." By allowing free redistribution, people are more likely to concentrate upon the content of the software, not just the amount of money they can make from it.The second requirement is that you must also distribute source code along with any programs released as open-source. The rationale behind this is that programs cannot evolve without modification. The open-source model relies on outside modification of software to provide almost continual improvements on a piece of software. This means that literally thousands of people around the planet can modify the same piece of software, correcting various bugs or improving on functions provided in the source. Without the source code this would be impossible, and the evolution of a piece of software would be halted. The OSI web site says it thus: "Since our purpose is to make evolution easy, we require that modification be made easy."There are a number of other requirements (there are nine in all) in the Open Source Definition, but these two will suffice to explore some of the most important aspects of the Open Source Initiative. The concept behind open-source software is that each piece of software should be not just a pet project of the inventor, but also a project for use by any other people. If the software is not freely modifiable or distributable, this concept immediately falls flat on its face, and the evolution of software for both common and specific good is impossible.The Open Source model allows for nearly continual evolution of products, contrasted with infrequent and often expensive upgrades in the closeted environments of commercial vendors. In addition, open-source software is frequently more reliable and better programmed than their its counterparts. This may seem to defy imagination, but this is one area where the old maxim "You get what you pay for" doesn't hold true.When a program is developed under the Open Source model, it is frequently released in a form that's less than desirable for use, meaning it has bugs or isn't terribly stable. However, if the program generates enough interest, other programmers will adopt the creator as the design head and start working on improvements. If the creator is less than willing to continue with a project, often someone else will ask for permission to take over the project. Eric Raymond's work with Fetchmail is a good example of this principle.If, on the other hand, a program is deemed not too useful, the creator is left to his own devices. If he doesn't see the need to continue working, the buggy program falls into disuse unless someone else wishes to claim it.By this method, something akin to Darwin's natural selection, programs that serve little purpose are little used and eventually fall out of circulation. They become extinct, if you will. Programs with good potential are picked up by the open-source community and revised and improved upon until they no longer can be. This is the process of software evolution.Software evolution accounts for the propensity of programs to become viable quickly. Under the Open Source model, programs are developed quickly, and bugs are soon phased out. The closed model, however, provides for no outside help, so the programmers working on a project must debug the code entirely by themselves. This takes much longer, resulting in fewer and more expensive updates to software. In addition, it doesn't necessarily mean that we can gauge the usefulness of a program. Before a commercial program is released, it is usually given to a select group of people known as "beta testers," who search for bugs and report them so that the programmers can fix the problems. In the Open Source model, once a reasonably stable version of a program is available, literally the entire Open Source community can beta test the program; this generates more bug reports and faster fixes for little to no cost.On the other hand, in a commercial capacity a program could easily cost up to a hundred dollars without actually being very useful. The Open Source model allows for poor ideas to die quickly with little cost to the consumer.Eric Raymond has detailed some of his experiences in the Open Source community in a paper entitled "The Cathedral and the Bazaar" (1996); check the resource list at the back of the book to find his web page. This is a very detailed description of an experiment with the Open Source model, and the results convinced Raymond to pioneer the Open Source Initiative (with help from others). That web page can also be found in the resource list.What Are the Advantages of Open Source?We've mentioned at least one in brief above: programs released using the Open Source model are frequently of higher quality and updated faster than programs released commercially. Many of these programs are also released free of charge, so the consumer is benefited in two ways. First, in cash flow; second, in a higher-quality product.You are directly involved in the Open Source world now that you're running Red Hat Linux. It is available directly for download, though a CD or two of information may take just a little too long. If you bought Red Hat in the box from the store, you paid some money for it; this mostly goes into your technical support fees. If you did any comparison shopping, you'll notice that Red Hat Linux still costs a bundle less than competing products like Microsoft Windows. And, as you'll find out in this book, Red Hat Linux is a more stable, less demanding operating system than Windows. (And most of the programs for it are available for download for free. That's an attractive price tag.)The Purpose of This BookThat brings us to the purpose of this book. We want to present you with a new user's guide to installing and setting up the basics of Red Hat Linux first. You'll go through the installation process and setting up GNOME and some of your hardware components, learning about how your computer operates and what you can do with it now that you're running Linux. Then you'll be presented with several chapters detailing applications that you can install and use on your system, like the GIMP, Star Office, WordPerfect for Linux (and the whole suite of tools), various games and other amusements, Internet applications, and many more.This book will equip you to understand the essentials of your Linux system, and it will provide plenty of help getting started with building your system. Many users are nervous about diving into Linux because they've spent so much time working with Windows or the MacOS and don't know that they can make the switch seamlessly. That's where we come in. By following the guidelines in the book, you'll have your computer up and running in no time, with little to no trouble importing your files and other documents written and stored in another format.And I suppose the main selling point of this book is that you don't need to buy books for each of the different applications you can get with your system. When you total up the cost of getting a book for the GIMP, Star Office, WordPerfect, and other applications you'll surely want to install on your system, the costs can make Linux a less attractive choice than its competitors. By purchasing Everyday Linux, you've paid for an installation guide and an instruction manual for most of your common, everyday use applications.Conventions Used in This BookThroughout this book, we make references to several different programs and operating systems. For instance, the X-Window System often appears. This is sometimes known as X-Windows. The version that comes with Red Hat Linux, however is known as XFree86. Whenever we refer to the X-Window System or X-Windows, you should assume we are talking about XFree86, which is a free version.When we speak of Microsoft Windows, we usually speak of the more common of the three prevalent versions of the operating system availableWindows95 and Windows98. Windows 2000 is still not being used on most personal computers, and Windows NT is used primarily for servers, which our user base probably won't be running.One kilobyte consists of 1024 bytes; one megabyte consists of 1024 kilobytes; one gigabyte consists of 1024 megabytes. Their respective abbreviations are kb, MB, and GB.When speaking of a computer's main memory, we refer to its random access memory (RAM), not to its hard drive space.You should also realize that when quotes are used in references to commands or items that you should type, you should not use them unless otherwise noted. If, for instance, you are asked to name a file "myfile.txt" while considering how to compose a text file, you should not include the quotes. In most cases, commands are typed in a Courier type font, which readily separates them from the rest of the book, which is typed in a Times font. When there is confusion, however, you should remember that if something to be typed has quotes around it, you should not use the quotes.Version Covered by This BookIn this book, we cover Red Hat Linux version 6.2. There are many different distributions of Linux, among them Debian, Caldera, Slackware, and SUSE. Because Linux changes quickly, this book is written with an effort to be viable for many of Red Hat's distributions starting at 6.0 and working up.Why Is there no Linux CD in this Book?One of the first items many people look for in a book on Linux is an actual copy of the operating system. My first Linux book had one, and many of those I investigated during the writing of this book had them, too. You have probably noticed that there isn't a CD of any sort put in this book.This is done for many reasons. The primary reason is that including a CD dates a book. Many of the directions for installation and set up are general in nature and won't change too much by the time Red Hat 7.0 (and later) comes out. We anticipate a major release of the operating system before the publication of this workif we included version 6.2, we would supply an outdated version that you may want to replace later. Moreover, putting a CD in the book would cost you more than buying it at a store or from a web site. This way, we pass along savings and the opportunity to start with a newer release of Linux.Some of you still may not be convinced, even though I have taken some pains to point out that Open Source development necessitates quick releases. One of the main highlights of Open Source is that new products are developed by thousands of people daily. This means that rather than upgrading your operating system or its applications every year or two, you could do so every week. Given the opportunity to get a newer version, you should do soit will support more devices and include improvements that make it even more user-friendly.Where Can I Get It?When all is said and done, you probably just want to be able to get the operating system. Linux itself is free. There can be some costs involved, however. If you buy it as a commercial product, such as a boxed set from Red Hat, you pay for the packaging, the manuals, and the technical support you receive. If you simply want to indulge your curiosity like most people, however, you can buy a no-frills package for at most ten dollars.Red Hat is available from most computer stores. Malls in your area will certainly carry it. If you like to shop online, you can use a site like linuxcentral.com or linuxmall.com. Our web site, www.everydaylinux.com, has a list of various vendors if you want to investigate the issue further.Resources, Hints, Etc.We make references to a number of resources used to write this book. To both give credit where it's due and to provide you with a place to look in case you need extra help (getting everything down into a book you'll actually read is next to impossible), you can look at the resource list at the back of this book. You'll find actually helpful web pages (rather than some of the less reliable ones out on the Internet), FTP sites, and other information that will be of assistance to you in case of need.The Layout of This BookThis book is divided into two large sections, a resource list, and an index.The first large section describes how to install and use elements of your Red Hat Linux system. You will cover information about how to update or upgrade your programs and system, add various elements of hardware, and get connected to the Internet. You'll also read about how to do some basic systems upkeep and administration, and how you can use the command-line interface to perform various tasks quickly and efficiently.The second large section will guide you through the use of many different applications from many different sectors. You'll find sections devoted to productivity suites, graphics manipulation, Internet browsing and e-mail, games, editors, and others. This section will allow you a good measure of flexibility once you're set up in Linux.The resource list will point you to various help files, frequently-asked-questions lists, and web pages, HOWTOs, and other resources. The index will give you an easy way to find topics in the book. These are categorized as thoroughly as possible so as to provide ease of use.