-->
Table of Contents


Introduction

Linux is no longer a “not ready for prime time” operating system! Many commercial uses of Linux abound, ranging from being used to create many of the fantastic special effects for James Cameron’s mega hit Titanic, to being used as the OS for new network computers. As Linux evolves, one has to keep up with the changes; that’s why you will find plenty of new material in this fourth edition of the popular Special Edition Using Linux.

Many chapters have been rewritten to highlight the Red Hat distribution—probably the most popular and easiest-to-install Linux distribution ever. In addition, the book contains updated coverage of such items as RPM (the Red Hat Package Manager), which offers the easiest way to install and upgrade your system; PAM, a leading security feature of most Linux distributions; and X Windows. You’ll also find another CD-ROM containing a lite version of Caldera’s OpenLinux Base product. Finally, on the third CD-ROM, you’ll find a copy of Caldera’s StarOffice, an integrated office application that includes several office automation programs.

However, if you’re just tuning in, you might want to know just what the heck Linux is.

In 1991, Linus Torvalds, then a 23-year-old college student, began a personal project to expand the Minix operating system into a full-fledged clone of the UNIX operating system that was so popular on college campuses. The project is still evolving: Linux is continuously updated and expanded by literally hundreds of people around the world.

Therefore, Linux is a unique animal in the computer (r)evolution. It isn’t a commercial product backed by a huge corporation; rather, it’s an operating system born of frustration and built by a ragtag team of computer enthusiasts around the world. This team used Internet resources to communicate and build the operating system named Linux.

But don’t think Linux is just a hobby for hackers around the world—it’s not! Plenty of commercial products are being written specifically for Linux. In fact, several companies are porting their UNIX-based applications, such as Corel’s WordPerfect, to Linux. As a matter of fact, Corel has adopted Linux for its new Network Computer and has released the resulting software to the development community.


NOTE:  While it is very hard to estimate the total number of Linux users or installations in the world, a working estimate shows between 5,000,000 and 10,500,000 active Linux users worldwide. For more information see the following URL:

     http://www.redhat.com/redhat/linuxmarket.html



NOTE:  If you don’t understand what a Uniform Resource Locator (URL) is or how to use it, don’t despair! This book will help you learn how to make your way around the Internet using Linux.


See “URLs,” p. 614

Many Fortune 500 companies use Linux for internal projects and mission-critical applications. And recently, large companies such as Netscape Communications, are embracing the concept of open solutions by releasing their own software into the development community, just as Linus Torvald and others released their software to the world.

There are also plenty of free applications and utilities for Linux. Since the inception of Linux, almost the entire GNU library of utilities has been ported to Linux, and the X Windows GUI system—so popular on UNIX-type workstations—also has been ported. GNU (a recursive acronym for “GNU’s Not UNIX”) is a project started by one man to make software available to anyone who wants access. The GNU General Public License in Appendix D describes the philosophy under which Linux and many other fine software packages are distributed. The accompanying CD-ROMs contain many of these packages.

This book provides you with enough information to use and enjoy Linux. The accompanying CD-ROMs contain the Red Hat 5.1 distribution and Caldera’s OpenLinux Lite, each of which use the 2.0.34 Linux kernel.

Probably the first order of business is to help you pronounce the word Linux. To most Americans, the pronunciation is LEN-nucks, with the short i sound. The official pronunciation is LIE-nucks, with the long i sound.


ON THE WEB:  
You can hear Linus pronounce Linux in English at the following URL:

     ftp://ftp.linux.org/pub/kernel/SillySounds/english.au


Who Should Use This Book?

Anyone interested in the Linux phenomenon can use this book as a guide to installing, configuring, and using Linux. Linux is often called a UNIX clone, but it’s actually a POSIX-compliant multiuser, multitasking operating system for Intel 386 and later processors. POSIX is an international standard for operating systems and software detailing interoperability standards. Linux doesn’t require MS-DOS or Windows to operate; in fact, Linux can replace those programs on your computer.

Because Linux is still evolving, it’s imperative that you understand the possibility of losing existing data on your system. Do not install Linux without first backing up your system. It might be necessary to repartition your hard drive to make room for this new operating system, although it’s possible to install Linux on top of MS-DOS or to repartition your hard drive without losing data. If you take the proper precautions, anyone can install and enjoy Linux.


NOTE:  The most current version of Linux is always available on the Internet, from sources listed in Appendix A, “Sources of Information.” The accompanying CD-ROMs contain the latest possible versions of Linux, but due to the rapid development of this popular operating system and the chaotic process in which it’s developed, it’s impossible to provide the latest and greatest on a CD-ROM. In fact, although all efforts are made to keep the book and CD-ROMs in synch, that also is nearly impossible. Unlike commercial software, which changes infrequently and under controlled conditions, Linux and related software are perpetually dynamic.

Because Linux is very similar to UNIX, many of the operations and procedures necessary for using Linux also apply to many UNIX systems. By learning to use Linux, you also learn how to use most UNIX systems.

UNIX has evolved over the years to become the premier operating system used by hundreds of thousands of people throughout the world. This isn’t an accident. Earlier versions of UNIX were harder to manipulate than other operating systems, but despite this, UNIX managed to amass a distinguished following in academic and scientific circles. These professionals realized not only what a powerful, flexible, and manageable operating system UNIX was, but also its potential to be the best operating system ever. Their efforts have culminated in the UNIX of today, with its marvelous utilities, bundled with the newest communications capabilities and graphical user interfaces (GUIs).

The UNIX of today promises again to revolutionize the personal computer industry, and perhaps redirect the industry’s growth. UNIX has evolved from a minicomputer operating system to one that crosses all hardware platforms. There’s no reason to think that this evolution will stop. UNIX may well become the standard for what most users dream of—complete standardization and compatibility of all computer systems eventually, regardless of size or power.

UNIX comes in several flavors from a variety of vendors, including versions for the Intel PC platforms, but most of these versions cost big bucks. Linux provides a relatively inexpensive—free if you have access to the Internet—solution to learning about UNIX-type procedures and commands, the X Windows GUI, and accessing the Internet via Linux.

Who Should Not Use This Book?

If you are a Linux kernel hacker or a UNIX guru, this book may not be your cup of tea. This book is a great resource for someone wanting to know more about Linux and UNIX who has never been involved with either operating system.

However, if you know how to install Linux and maneuver around in UNIX, you may still find this book of use, particularly if you are only a UNIX user and have never had the chance to perform system administration tasks. Several sections of the book explain the finer points of system administration and how to maintain a Linux/UNIX system. Typically, a normal UNIX user is never allowed to perform these system administration tasks, but with Linux you become king of the hill and ruler of the system, free to do whatever you want to do!

Now, if you don’t have a clue what MS-DOS is or what a floppy disk looks like, you might want to brush up on some computer basics before tackling Linux. Linux isn’t for the faint of heart—you must have some understanding of how a computer works. If the thought of repartitioning or reformatting your hard drive sends shivers down your spine, you probably should put off learning Linux for a while until you become more comfortable with your computer system.

Hardware Needed to Use This Book

Most of Linux has been written across the Internet by computer hackers (not crackers, but people who truly enjoy writing software that accomplishes something). Thus, the hardware supported by Linux is the hardware owned by the various hackers.

However, many hardware manufacturers are accepting Linux as a valid market and are beginning to write drivers for their hardware. They are also providing hardware specifications to the world so that Linux developers can write software to work with the hardware. Many companies are also farming out work to Linux developers to specifically write drivers for their hardware. These companies then release the code into the community under GNU guidelines. This is a dramatic change from a few years ago when many manufactures withheld information for proprietary and competitive reasons.

Table 1 is a brief list of the supported hardware. If you don’t have the correct hardware, it’s unlikely that you’ll be able to boot Linux and productively use the system—forewarned is forearmed! Appendix C, “The Linux Hardware Compatibility HOWTO,” provides a more in-depth listing of Linux-supported hardware.


I feel it’s only fair to let you know what type of systems we used to create this book. The test machine was a Pentium II 233-based system with 64MB of RAM and a Buslogic SCSI controller, a 4 gigabyte Micropolis SCSI drive, an NE2000 PCI Ethernet card, a 24x ATAPI CD-ROM, and a Matrox Mystique video card. The name server used in our network is a no-name 486dx100 system with IDE drives and 32MB of memory running Red Hat Linux. This machine is also the main sendmail server for the site. The main Web server is a Digital Equipment Alpha also running Red Hat Linux. The entire site is connected to the Internet via an ISDN line using an Ascend Pipeline 75 router.

Table 1 A Brief List of Hardware Supported by Linux

Item Description

CPU Intel 386 and later (and compatibles), DEC Alpha, Sun Sparcs, and PowerMacs.
Bus ISA, EISA, VESA local bus, and PCI; the MicroChannel bus isn’t fully supported yet.
RAM Minimum of 2MB of RAM; 4MB is recommended.
Hard drive controller AT standard hard drive controller; Linux supports MFM, RLL, ESDI, and IDE controllers. Linux also supports several popular SCSI drive and CD-ROM drive controllers.
Disk space Minimum of 20MB; 80MB is recommended.
Monitor Linux supports Hercules, CGA, EGA, VGA, and SVGA video cards and systems; X Windows has other requirements detailed in Chapter 21, “Installing the X Windows System.”
Mouse Any standard serial mouse (for example, Logitech, Microsoft, or Mouse Systems) or bus mouse from Microsoft, Logitech, or ATIXL.
CD-ROM drive Any CD-ROM drive that uses a true SCSI interface works; some proprietary CD-ROM drives such as the SoundBlaster series are also supported. CD-ROM drives known to work with Linux include NEC CDR-74, Sony CDU-45, Sony CDU-31a, Mitsumi CD-ROMs, and Texel DM-3042.
Tape drive Any SCSI tape drive works; other drives hosted from a floppy controller may also be supported. Now, the Colorado Jumbo 120 and 250 using the QIC 80 format are supported.
Printer If you can access your parallel printer from MS-DOS, you should be able to access it from Linux; some fancy features might not be accessible.
Ethernet card If you have access to an Ethernet network, Linux supports several standard Ethernet cards for accessing your network. Cards supported include 3Com’s 3C503, 3C509, and 3C503/16; Novell’s NE1000 and NE2000; and Western Digital’s WD8003 and WD8013.


ON THE WEB:  
The following Web site provides more information on MicroChannel bus support:

   http://glycerine.itsmm.uni.edu/mca/


How to Use This Book

You may prefer to read this book from cover to cover. The information progresses from simple to complex as you read through the various sections and their chapters. Because the information is separated into seven parts and four appendixes, each with its own particular emphasis, you can choose to read only those parts that appeal to your immediate needs. Don’t, however, let your immediate needs deter you from eventually giving attention to each chapter. Whenever you have the time, you can find a wealth of information in them all!

Part I: Installing Linux

Part I, “Installing Linux,” provides a detailed overview of the Linux system as well as instructions to get Linux up and running. It consists of six chapters:

  Chapter 1, “Understanding Linux,” introduces the Linux operating system and provides a general overview of the various components that make up the Linux system and various distributions.
  Chapter 2, “Linux Installation Overview,” provides a general overview of installing various Linux distributions, with specific emphasis on supported hardware and potential problems and their resolutions.
  Chapter 3, “Installing Red Hat,” gives detailed instructions for installing the version of Red Hat provided on the accompanying Red Hat CD-ROM.
  Chapter 4, “Installing Caldera OpenLinux Lite,” gives detailed instructions for installing the version of OpenLinux provided on the accompanying CD-ROM.
  Chapter 5, “Running Linux Applications,” provides a basic introduction to the process of running various applications on your Linux system after you get Linux up and running.
  Chapter 6, “Upgrading and Installing Software with RPM,” provides you with the information needed to install new software using the Red Hat Package Management system (RPM). The chapter also covers installing software from the Internet and tells you how to patch existing programs.

Part II: System Administration

Part II, “System Administration,” provides basic information on configuring and managing a typical Linux installation.

  Chapter 7, “Understanding System Administration,” provides a brief background of the processes and procedures needed to configure and maintain a Linux system.
  Chapter 8, “Using the vi Editor,” instructs you how to use UNIX’s visual editor. Although vi isn’t the most productive editor in the world, every Linux/UNIX system has it, and sometimes it’s the only editor available for use.
  Chapter 9, “Booting and Shutting Down,” details the various actions that happen when you boot up or shut down a Linux system, and explains why you can’t simply switch off the power supply. This chapter contains a complete description of the files Linux uses to boot.
  Chapter 10, “Managing User Accounts,” shows you how to add, delete, and manage user accounts on your machine.
  Chapter 11, “Backing Up Data,” explains the necessity of backing up your data, as well as the procedures needed to back up your Linux system.
  Chapter 12, “Improving System Security,” gives you a brief overview of system security on Linux systems and then explains the procedures needed to maintain a reasonably secure system.
  Chapter 13, “Configuring the Linux Kernel,” illustrates how to configure a kernel, no matter what distribution you are using, for your hardware.

Part III: Managing the File System

Part III, “Managing the File System,” provides detailed knowledge of how to be more productive with various Linux features. Everything you learn in these four chapters can be transferred easily to other UNIX-type systems:

  Chapter 14, “Managing File Systems,” provides an overview of creating, mounting, and using a file system under Linux.
  Chapter 15, “Using Samba,” provides a detailed explanation of Samba and how to configure Linux to use Samba with other Linux systems as well as with NT systems.
  Chapter 16, “Understanding the File and Directory System,” provides an overview of file permissions, users, and file types.
  Chapter 17, “Managing Files and Directories,” details the Linux file system structure and organization, file-naming conventions, and directory hierarchy. The chapter also teaches you how to successfully navigate the Linux file system.

Part IV: Working with Linux

Part IV, “Working with Linux,” increases your skill at working with the Linux command-line tools and utilities.

  Chapter 18, “Understanding Linux Shells,” introduces you to the magical world of Linux shells, the powerful capabilities that exist through the use of shell scripting, and the different shells you may encounter with different versions of Linux.
  Chapter 19, “Managing Multiple Processes,” explores the capabilities of Linux when you run more than one process at a time. You learn how to initiate and manage multiple processes, as well as how to control and stop them.
  Chapter 20, “Printing,” covers all the printing basics, from issuing print commands and checking printer status to canceling print jobs and dealing with common printing problems.
  Chapter 21, “Installing the X Windows System,” provides you with the necessary information to get the X Windows system up and running under Linux. Under Linux, the X Windows system is called XFree86 and is similar to other GUI environments, such as Microsoft Windows or the OS/2 Workplace Shell.
  Chapter 22, “Using X Windows,” provides you with information necessary to use the X Windows system under Linux.

Part V: Network Administration

Part V, “Network Administration,” provides a greater understanding of the procedures and processes necessary to administer a robust Linux system.

  Chapter 23, “Understanding the TCP/IP Protocol Suite,” provides an overview of the network transport protocol suite in use today on the Internet.
  Chapter 24, “Configuring a TCP/IP Network,” shows you how to set up and configure TCP/IP on Linux.
  Chapter 25, “Configuring Domain Name Service,” provides you with the necessary information to get your system up and running with Domain Name Service (DNS).
  Chapter 26, “Configuring Electronic Mail,” provides you with the necessary information to get your e-mail system up and running with sendmail.
  Chapter 27, “Configuring a Usenet News Service,” provides you with the necessary information to set up Usenet news on your system.
  Chapter 28, “Using the emacs Editor,” teaches you how to use the ubiquitous UNIX editor written by GNU patriarch Richard Stallman.

Part VI: Using the Internet

The six chapters in Part VI, “Using the Internet,” provide a basic overview of the Internet.

  Chapter 29, “Using SLIP and PPP,” illustrates how to configure and use Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP) lines to connect with the Internet.
  Chapter 30, “Accessing the Network with telnet, ftp, and the r- Commands,” provides you with information on how to use various programs such as telnet and ftp to access information around the world.
  Chapter 31, “Surfing the Internet with the World Wide Web,” gives you an overview of using various Linux utilities to search for and retrieve information from the Internet, with emphasis on the Web.
  Chapter 32, “Creating Web Documents with HTML,” tells you how to create home pages for the World Wide Web by using HTML for your Linux system.
  Chapter 33, “Using Electronic Mail,” gives you an overview of electronic mail (e-mail) and how to use it in Linux.
  Chapter 34, “Surviving Usenet News,” provides you with an explanation of Usenet newsgroups, as well as instructions for accessing this global community of newsgroups.

Part VII: Setting Up a Linux Web Server

Part VII, “Setting Up a Linux Web Server,” provides detailed information on setting up and running a Web server on Linux. Three chapters make up this part:

  Chapter 35, “Getting Started with Apache,” gives you the basics so that you can get started with Apache. It covers compiling and installing Apache, and the basic configuration options.
  Chapter 36, “Configuring Apache,” discusses the major configuration options within Apache, including MIME types, indexing, server-side includes, image maps, and virtual hosts.
  Chapter 37, “Managing an Internet Web Server,” discusses the various administrative concepts involved with managing a Web server, including controlling the server child process, increasing server efficiency, managing log files, and dealing with security issues.

Appendixes

The appendixes provide supplementary information on installing and using Linux, as well as licensing information for using Linux. The book contains the following six appendixes:

  Appendix A, “Sources of Information,” provides you with a detailed listing of books, magazines, Usenet newsgroups, and FTP sites dealing with Linux. Also, you get a brief glimpse of the myriad resources available to you as a Linux user.
  Appendix B, “The Linux HOWTO Index,” provides a list of all the main and mini HOWTOs available. HOWTOs provide information on how to accomplish a specific task with Linux. This HOWTO comes directly from the Internet.
  Appendix C, “The Linux Hardware Compatibility HOWTO,” provides important details on the hardware supported by the current Linux distribution. This HOWTO also comes directly off the Internet.
  Appendix D, “The GNU General Public License,” is the verbatim license for using GNU applications. It describes your responsibilities when modifying, distributing, or using GNU programs.
  Appendix E, “Installing StarOffice,” covers how to install and use StarOffice, Caldera’s office suite of applications.
  Appendix F, “What’s on the CD-ROM,” discusses the contents of the three CD-ROMs included with this book.

Conventions Used in This Book

This book uses several special conventions that you need to become familiar with. These conventions are listed here for your reference.

Linux is a case-sensitive operating system; that means when this book instructs you to type something at a command or shell prompt, you must type exactly what appears in the book, exactly as it is capitalized. This book uses a monospaced typeface for Linux commands to set them off from standard text. If you’re instructed to type something, what you are to type appears in bold monospace text. For example, if the book gives the following instruction:

Enter cat.

You must press the letters <c>, <a>, and <t> and then press the <Enter> key.

Keys are sometimes pressed in combination; when this is the case, the keys are presented like this: <Ctrl-h>. This example implies that you must press and hold the <Ctrl> key, press the <h> key, and then release both keys.


NOTE:  This book uses a convention for key names that may vary from what you are accustomed to. To avoid confusion in the case-sensitive UNIX environment, this book uses lowercase letters to refer to keys when uppercase letters may be the norm. For example, this book uses the form <Ctrl-c> instead of the form <Ctrl-C> (the latter form may make some readers wonder whether they should press <Ctrl> and <Shift> and <c>).

Some example listings show a portion of the screen after you type a specific command. These listings show the command prompt or shell prompt—usually a dollar sign ($)—followed by what you type in bold. Don’t type the dollar sign when you follow the example on your own system. Consider this example:


$ lp report.txt &

3146

$

You should type only what appears in bold on the first line (that is, type lp report.txt & and then press <Enter>). The rest of the listing shows Linux’s response to the command.

When discussing the syntax of a Linux command, this book uses some special formatting to distinguish between the required portions and the variable portions. Consider the following example:


lp filename

In this syntax, the filename portion of the command is a variable; that is, it changes depending on what file you actually want the lp command to work with. The lp is required because it’s the actual command name. Variable information is presented in italic; information that must be typed exactly is not in italic.

In some cases, command information is optional—that is, it’s not required for the command to work. Square brackets ([]) enclose optional parts of the command syntax. Consider the following example:


lp filename [device1] [abc]

Here, lp is the command name and is neither optional nor variable. The device1 parameter is both variable and optional (it is in italic and enclosed in square brackets); this means that you can type any device name in place of device1 (without the brackets), or you can type nothing at all for that parameter. The abc parameter is optional (you don’t have to use it if you don’t want to), but it’s not variable; if you use it, you must type it exactly as it appears in the book—again, without the brackets.

Tips, notes, and cautions appear throughout the book in special formats to make the information they contain easy to locate. Longer discussions not integral to the flow of the chapter are set aside as sidebars, with their own heading.

The book also contains many cross-references to appropriate topics throughout the book. A typical cross-reference appears as follows:


See “Using X Windows,” p. xxx


Table of Contents