2915FM.qxd 05/09/01 12:16 PM Page xi

CONTENTS AT A GLANCE

Introduction xxxii

Part I: Welcome to Linux

Chapter 1: What Is Linux? 3 Chapter 2: Choosing a Distribution 13

Part II: Installing Linux

Chapter 3: Getting Ready to Install Linux 27 Chapter 4: Installing Linux 45 Chapter 5: Special Installations 69

Part III: Using Desktop Environments in Linux

Chapter 6: An Overview of X Windows 83 Chapter 7: Installing and Configuring X Windows 109 Chapter 8: Using GNOME and X Windows 137 Chapter 9: Using Applications with GNOME and X Windows 161 Chapter 10: Advanced GNOME Configuration 193 ChapterCOPYRIGHTED 11: Using KDE MATERIAL 217 Chapter 12: Advanced X Windows Configuration 259 2915FM.qxd 05/09/01 12:16 PM Page xii

Part IV: Mastering the Essentials

Chapter 13: Introducing Linux Commands 291 Chapter 14: Working with Files 315 Chapter 15: Using LinuxConf and Other Tools for System Configuration 333 Chapter 16: Understanding the Shell 361 Chapter 17: General System Administration 383 Chapter 18: Using Peripherals 409 Chapter 19: Linux Multimedia 443 Chapter 20: Recompiling the Linux Kernel 455

Part V: Basic Connectivity

Chapter 21: Understanding Linux Networking 483 Chapter 22: Connecting Linux to the 495 Chapter 23: Using the 517 Chapter 24: Reading E-Mail 549 Chapter 25: Faxing from Linux 571

Part VI: Using Linux in the Small Office/Home Office (SOHO)

Chapter 26: Where to Use Linux in the SOHO 589 Chapter 27: Installing Linux for the SOHO 601 Chapter 28: Configuring Linux for an Ethernet Network 615 Chapter 29: Integrating Linux in Windows and Novell Networks 643 Chapter 30: Linux and DOS/Windows 663 Chapter 31: Security and Linux As an Inexpensive Router 685 2915FM.qxd 05/09/01 12:16 PM Page xiii

Part VII: Using Linux As a Web and E-Mail Server

Chapter 32: Building Your Own 705 Chapter 33: Linux As a Mail Server: The Power of Sendmail 787

Appendices

Appendix A: Linux around the World (Non-English Linux Distributions) 797 Appendix B: Sources of Linux Information 809 Appendix C: Linux Command Reference 817 Appendix D: GNU General Public License 893 Appendix E: Linux on Non-Intel Hardware 903

Index 908 2915FM.qxd 05/09/01 12:16 PM Page xiv 2915FM.qxd 05/09/01 12:16 PM Page xv

CONTENTS

Introduction xxxii

PART I: Welcome to Linux 1

1 What Is Linux? 3 Linux History 4 Linux as an Operating System 5 A Multitasking Operating System 6 A Multiuser Operating System 7 Linux Applications 8 Linux as Free 9 Commercial Applications for Linux 10 Looking Ahead 10 2 Choosing a Distribution 13 What Is a Distribution? 14 An Overview of Major Distributions 15 The Major Distributions 16 Red Hat Linux 20 What’s New about Red Hat Linux 7 21 Looking Ahead 23

PART II: Installing Linux 25

3 Getting Ready to Install Linux 27 What You Need 28 The Minimum PC for Linux 29 A Good PC for Linux 30 Added Bonuses 31 Checking Your Hardware for Compatibility 32 Recording Your Hardware Information 33 Video Cards 33 2915FM.qxd 05/09/01 12:16 PM Page xvi

xvi Contents

Sound Cards 34 Monitors 34 Mice 35 Hard Drives 35 Modems 36 Network Cards 36 USB 36 Other Peripherals 37 Choosing an Installation Method 37 From CD-ROM 37 From Floppy Disk and CD-ROM 38 From Hard Disk 39 Arranging Your Hard Disk 39 Partitioning Concepts 39 A Sample Partition Scheme for a Windows 98 System 40 Looking Ahead 42 4 Installing Linux 45 Starting the Installation 46 Configuring Your System for Installation 48 Keyboard Controls 48 Choosing a Language 49 Choosing a Keyboard Type 50 Configuring Your Mouse 51 Installing or Upgrading? 51 Setting Up Your Disk Partitions 52 Formatting Your Linux Partitions 58 Setting Up LILO 58 Network Configuration 60 Time Zone Configuration 60 Account Configuration 60 Authentication Configuration 61 Selecting Packages 61 Configuring X Windows 63 The Installation Process 64 Creating a Boot Disk 65 Rebooting Your System 66 Looking Ahead 66 2915FM.qxd 05/09/01 12:16 PM Page xvii

Contents xvii

5 Special Installations 69 Installing from a Hard Disk Partition 70 Copying the CD-ROM to a Hard Disk Partition 71 Preparing the Installation Floppies 71 The Actual Installation Process 71 Installing Linux on Multiple Partitions 72 Putting Swap on a Separate Disk 73 Splitting Linux across Multiple Partitions 73 Using Fdisk instead of Disk Druid 75 Displaying the Partition Table 76 Adding a Partition Using Free Space 77 Changing the Partition Type 77 Deleting a Partition 78 Committing Your Changes 78 Looking Ahead 79

PART III: Using Desktop Environments in Linux 81

6 An Overview of X Windows 83 What Is X Windows? 84 Microsoft Windows versus X Windows 87 Similarities 87 Differences 87 X Servers, Window Managers, and Desktop Environments 90 X Servers 90 Window Managers 94 Desktop Environments 102 What Is Motif? 105 Do I Need Motif? 106 An Alternative to Motif 107 Looking Ahead 107 7 Installing and Configuring X Windows 109 Obtaining X Windows 110 Installing from the Red Hat Linux 7 CD-ROM 110 Installing from the Internet 113 2915FM.qxd 05/09/01 12:16 PM Page xviii

xviii Contents

Preparing to Configure X Windows 116 Make and Model of Your Video Card 116 Make and Model of Your Monitor 117 Video Memory on Your Video Card 117 Type of Mouse You Are Using 117 Horizontal Sync Range for Your Monitor 118 Vertical Sync Range for Your Monitor 118 Configuring XFree86 with Xconfigurator 118 Configuring XFree86 with Xf86config 126 Testing Your Configuration 132 Looking Ahead 134 8 Using GNOME and X Windows 137 Starting X Windows and GNOME 138 Panel 140 Using the System Menu 141 Manipulating the GNOME Panel 145 Panel Applets 146 Using the Desk Guide and Tasklist Applets 148 The GNOME Interface 149 Manipulating Windows 149 The GNOME Desktop 151 Managing Files with GNOME 152 Launching the GNOME File Manager 152 The File Manager Window 153 Important Menu Options 157 Looking Ahead 159 9 Using Applications with GNOME and X Windows 161 Using Xterm 162 Customizing Xterm 164 Setting the Color Scheme 166 Setting the Window Size and Location 168 Setting the Window Title 170 Running an Application in an Xterm Window 171 Setting the Font 172 Other Features 175 2915FM.qxd 05/09/01 12:16 PM Page xix

Contents xix

X Windows Applications 175 The GIMP 176 Gnumeric 182 X Windows Utilities 185 Using Gedit 186 X Windows Clocks 188 Using the GNOME Calculator 190 Looking Ahead 191 10 Advanced GNOME Configuration 193 Using the GNOME Control Center 194 Desktop 196 Document Handlers 201 Multimedia 204 Peripherals 205 Sawfish Window Manager 207 Session 209 User Interface Options 209 Configuring GNOME Panels 210 Adding a Drawer to a Panel 211 Adding a Logout Button to a Panel 211 Adding a New Launcher 212 Controlling Panel Properties 213 Looking Ahead 214 11 Using KDE 217 A History of the KDE Project 218 Reviewing a KDE Distribution 219 Writing KDE Applications 219 KDE and Red Hat Linux 7 220 Updating KDE 221 Starting KDE 222 Exiting KDE 224 Using kdm for Graphical Login 225 Configuring kdm 225 Adding Other KDE Applications 229 Exploring the KDE Desktop 230 Launching KDE Applications 232 2915FM.qxd 05/09/01 12:16 PM Page xx

xx Contents

Using Multiple Desktops 233 Working with Application Windows 233 Browsing the File System 234 Using Konqueror Windows 235 Using the Quick Browser 238 Creating KDE Link Files 240 Configuring KDE 241 Using the KDE Control Center 241 Updating Menus and the Desktop 251 Using the KDE Utilities 252 Viewing Text and Graphics 252 Managing Your Time 253 KDE Office Suite 254 Administering Your Linux System 255 Looking Ahead 256 12 Advanced X Windows Configuration 259 The XF86Config File 260 Files 262 ServerFlags 263 Module 266 InputDevice - Keyboard 267 InputDevice - Pointer 270 Monitor 272 Modes 273 Device 274 Screen 276 The X Windows Start-Up Sequence 278 The .xinitrc File 279 The .Xclients File 282 X Resources 285 How X Resources Work 285 Setting X Resources with .Xdefaults 286 The Database of X Resources 287 Using the xrdb Command to Load X Resources 287 Looking Ahead 287 2915FM.qxd 05/09/01 12:16 PM Page xxi

Contents xxi

PART IV: Mastering the Essentials 289

13 Introducing Linux Commands 291 What Is a Linux Command? 292 Executing a Linux Command 293 Common Linux Commands 293 su 294 pwd, cd, and ls 295 and less 298 find, locate, and grep 300 tar and gzip 304 man and xman 310 Looking Ahead 313 14 Working with Files 315 Copying and Deleting Files 316 Copying Files 316 Deleting Files 323 Deleting Whole Directories 324 Moving and Renaming Files 326 The Basic Move Operation 326 Moving and Renaming 326 Moving More Than Just One File 326 Creating Files 327 Creating Directories 328 Creating Symbolic Links 329 A Quick Introduction to Filename Expansion 330 Looking Ahead 330 15 Using LinuxConf and other Tools for System Configuration 333 Configuring Printers 334 The PrintTool Menu 335 The Lpd Menu 336 2915FM.qxd 05/09/01 12:16 PM Page xxii

xxii Contents

The Tests Menu 337 The Help Menu 337 The Edit Button 338 The Add Button 342 The Delete Button 343 Working with Windows Printers 344 Launching LinuxConf 344 Adding Modules 346 Managing Users and Groups 347 Managing Users 347 Managing Groups 353 Saving and Quitting 355 Configuring a Modem 356 Setting the Time and Date 357 Looking Ahead 359 16 Understanding the Shell 361 Comparing Shells 362 Bourne Shell (sh) 363 C Shell (csh) 363 Bourne Again Shell (bash) 363 Korn Shell (ksh) 364 Other Shells 364 Experimenting with Different Shells 364 Overview of the Bash Shell 365 Setting Environment Variables in Bash 366 Input and Output Redirection 367 Filename Completion 368 Command Alias 369 Command-Line Editing 370 Command History List 371 Job Control 374 Pattern Expansion 377 Looking Ahead 381 17 General System Administration 383 Managing Users 384 Creating Users 385 2915FM.qxd 05/09/01 12:16 PM Page xxiii

Contents xxiii

Changing useradd Defaults 386 Changing Passwords 387 Setting Up Default Home Directories 388 Removing Users 388 Managing Groups 389 Creating Groups 389 Adding Users to Groups 390 Deleting Groups 391 System Start-Up 391 What Happens During Booting? 392 The init Program 392 Using the rc.local File 395 Shutting Down 396 Scheduling Jobs with crond 397 How crond Works 397 Scheduling Jobs 397 Managing Logs 402 What Gets Logged? 403 Rotating Logs 405 Looking Ahead 407 18 Using Peripherals 409 Linux and Plug and Play 410 Channels, Addresses, and Ports 410 ISA 411 PCI 411 External 411 USB 412 Printers 412 Which Printer to Use 412 The printcap File 414 Print Filters 415 Modems 425 Modem Detection 426 Understanding Linux Ports 428 Getting Your Modem Ready 430 Software for Working with Your Modem 433 Using minicom to Test Your Modem 434 Issues with ISDN Adapters 437 2915FM.qxd 05/09/01 12:16 PM Page xxiv

xxiv Contents

Other “Modems” 438 USB Mice/Keyboards 438 USB Mice 439 USB Keyboards 440 Looking Ahead 441 19 Linux Multimedia 443 Configuring Sound Cards 444 Using sndconfig 445 In Case of Silence 447 Using XPlaycd 448 Other Multimedia Applications 450 The GNOME CD Player 450 MpegTV Player 1.0 451 Festival Speech Synthesis System 451 MiXViews 451 Grio and Krio 451 RealPlayer 452 FreePhone 452 Looking Ahead 452 20 Recompiling the Linux Kernel 455 Why Change the Kernel? 456 Learning About Modules 458 Understanding Reasons to Recompile 459 Finding Out about Kernel Updates 460 Checking for Source Packages 461 Checking for Tools 462 Backing Up the Old Kernel 462 Getting a New Kernel 464 Configuring the New Kernel 465 Understanding the Options 466 Starting the Command-Line Interface 467 Starting the Character-Based Menu Interface 469 Starting the Graphical Interface 474 Compiling and Running the New Kernel 477 Starting the Rebuild Process 477 Testing the New Kernel 478 Looking Ahead 479 2915FM.qxd 05/09/01 12:16 PM Page xxv

Contents xxv

PART V: Basic Connectivity 481

21 Understanding Linux Networking 483 TCP/IP Fundamentals 484 What Is TCP/IP? 484 TCP/IP Configuration Essentials 484 TCP/IP Ports 490 Routing Concepts 491 Looking Ahead 493 22 Connecting Linux to the Internet 495 What Is PPP? 496 Required Hardware and Software 497 The Modem 497 PPP in the Kernel 497 Installing PPP Software 498 Graphical PPP Connections 499 RP3 499 KPPP 503 Manual PPP Connections 506 Making a PPP Connection 507 Once You Have a Connection 512 Hanging Up 513 Automating Manual Internet Connections 513 The dial Script 514 The hangup Script 514 Looking Ahead 515 23 Using the World Wide Web 517 An Overview of Linux Browsers 518 Amaya 519 Lynx 520 Opera 521 522 Netscape 6 523 Installing and Using Netscape 523 Installing from the CD-ROM 524 2915FM.qxd 05/09/01 12:16 PM Page xxvi

xxvi Contents

Installing from the Web 524 Netscape Applications 525 Accessing the World Wide Web 525 Configuring Netscape Mail 534 Local versus Remote Mailboxes 534 POP3 Mail Servers 535 IMAP4 Mail Servers 536 Configuring Netscape for E-mail 537 Reconfiguring Netscape Mail 541 Installing and Using Lynx 543 Downloading a Newer Version 544 Looking Ahead 547 24 Reading E-Mail 549 Offline Mail Readers 550 Netscape 6 550 Online Mail Programs 559 pine and elm 559 Looking Ahead 569 25 Faxing from Linux 571 Linux Fax Software 572 Efax for Linux 573 Installing Efax in Linux 573 Sending Your First Fax 576 Sending a Fax by Printing 579 Receiving Faxes 582 Looking Ahead 585

PART VI: Using Linux in the Small Office/Home Office (SOHO) 587

26 Where to Use Linux in the SOHO 589 Linux As a File Server 590 Dedicated File Servers 591 Peer-to-Peer File Sharing 591 Linux As a Print Server 592 Linux As a Database Server 592 2915FM.qxd 05/09/01 12:16 PM Page xxvii

Contents xxvii

Linux As an Intranet Server 593 Linux As an Applications Server 594 Linux As a Router 595 Linux As a Workstation 598 Looking Ahead 598 27 Installing Linux for the SOHO 601 Choosing Packages for a LAN Installation 602 Configuring Network Support During Installation 603 Selecting a Network Card 605 Basic Network Configuration 605 Manual Network Address Configuration 605 Manual Networking Configuration 606 Installing from a Network Source 607 Installing from an NFS Source 608 Installing from an FTP Source 610 Installing from a Web Server 611 Looking Ahead 612 28 Configuring Linux for an Ethernet Network 615 Preparing and Configuring the Network 616 Installing and Setting Up a Network Card 617 Checking Whether the Module Loaded 620 Setting Up Your TCP/IP Parameters 621 Testing the Network 628 Manual Network Configuration 631 Setting Up the Interface 631 Setting Up a Nameserver (DNS) 632 Setting Up a Local Hosts File 633 Setting Up Routes 634 Automating Network Configuration at Boot Time 635 Sharing Files on a Linux/Unix Network 635 Sharing Directories on the Network 636 Accessing Remote File Systems 638 Mounting Remote Directories at Boot Time 638 Basic Network Security 639 Looking Ahead 641 2915FM.qxd 05/09/01 12:16 PM Page xxviii

xxviii Contents

29 Integrating Linux in Windows and Novell Networks 643 Sharing Linux Files and Printers with Windows Networks 644 Installing Samba 645 Configuring Samba 646 Running Samba 652 Accessing Windows Network Files and Printers from Linux Systems 653 Using smbclient 654 Using smbprint 657 Using smbfs 658 Connecting Linux to a Novell Network 660 Looking Ahead 660 30 Linux and DOS/Windows 663 Running DOS Applications in Linux 664 Installing DOSEmu 665 Configuring DOSEmu 665 Mounting Directories with lredir 674 VMware 675 Getting VMware 676 Installing VMware 676 Installing an Operating System on VMware 677 Why Not Wine? 680 The Future of Wine 681 Wine Success Stories 682 Looking Ahead 682 31 Security and Linux As an Inexpensive Router 685 Basic Security Issues 686 Securing a Stand-Alone System 686 Securing a Linux System on a LAN 687 Keeping Your Network Secure 689 Creating a Linux-Based Router 690 What You Will Create 691 Getting Ready 692 The Operating Environment 694 Starting the Linux Router 695 Installing Network Card Modules 696 2915FM.qxd 05/09/01 12:16 PM Page xxix

Contents xxix

Configuring Basic Network Settings 697 Setting Up Basic Security 699 Further Network Configuration 700 Saving Your Changes 700 Going Further 700 Looking Ahead 701

Part VII: Using Linux As a Web and E-Mail Server 703

32 Building Your Own Web Server 705 What Is a Web Server? 706 More Than Just Retrieving Files 707 Linux Web Servers 709 Apache 710 NCSA 710 W3C/Jigsaw 711 WN 712 712 Stronghold 713 FastTrack/iPlanet 713 AOLserver 714 Java Web Server 714 Zeus 715 Installing Apache 716 Installing Apache from the Red Hat CD-ROM 716 Downloading the Latest Version of Apache 716 Configuring Apache 719 Apache Configuration File 720 Global Environment 749 Main Server Configuration 750 Managing Your Web Server 755 Starting and Stopping Apache 755 Managing Apache Users and Groups 757 Protecting Directories with Access Control 758 Maintaining Logs 762 Building a Web Site 762 Looking Ahead 785 2915FM.qxd 05/09/01 12:16 PM Page xxx

xxx Contents

33 Linux As a Mail Server: The Power of Sendmail 787 The Concept of a Mail Transport Agent 788 Sendmail as the Foremost MTA 789 Smail 789 Qmail 790 Configuring Sendmail with M4 790 Installing the Sendmail Files 791 Creating an Online Mail Server 791 Looking Ahead 794

Appendices

A Linux around the World (Non-English Linux Distributions) 797 Linux in Croatian 798 MicroLinux 798 Linux in French 798 MNIS Linux 798 Linux in German 799 EasyLinux 799 Icepack Linux 799 Linux in Japanese 800 Laser5 Linux 800 Vine Linux 800 Linux in Portuguese 800 Conectiva Linux 800 Linux in Russian 801 Open Kernel: Linux 801 Black Cat Linux 801 Linux in Spanish 802 Eurielec Linux 802 ESware Linux 802 Linux in Swedish 803 Blue Linux 803 Linux in Turkish 803 Gelecek Linux 803 Linux in Multiple Languages 803 Best Linux 804 2915FM.qxd 05/09/01 12:16 PM Page xxxi

Contents xxxi

Caldera Linux 804 Debian Linux 805 Mandrake Linux 805 Red Hat Linux 805 S.u.S.E Linux 806 TurboLinux 806 B Sources of Linux Information 809 General Information 810 Linux Professional Certifications 811 Linux Distributions 811 Mailing Lists and Newsgroups 812 Non-Intel Platforms 814 Non-English Sites 814 Places to Purchase Linux CD-ROMs 814 Places to Download Linux and Linux Files 815 X Windows 815 C Linux Command Reference 817 Commands Covered in This Appendix 818 D GNU General Public License 893 Preamble 894 Terms and Conditions for Copying, Distribution, and Modification 895 No Warranty 899 Appendix: How to Apply These Terms to Your New Programs 900 E Linux on Non-Intel Hardware 903 Linux for the Compaq Alpha Processor 904 Embedded Linux 904 Linux for Motorola 680x0 Processors 905 Linux for MIPS Processors 906 Linux for the Power Macintosh 906 Linux for PowerPC Processors 907 Linux for SPARC Processors 907

Index 908