• Tidak ada hasil yang ditemukan

Special Edition Using Linux 4th Edition pdf pdf

N/A
N/A
Protected

Academic year: 2019

Membagikan "Special Edition Using Linux 4th Edition pdf pdf"

Copied!
894
0
0

Teks penuh

(1)

i Contents

Using

(2)
(3)

iii Contents

Jack Tackett, Jr.

Steve Burnett

Using

Linux

(4)

Special Edition Using Linux

Copyright © 1999 by Que Corporation

All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, me-chanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omis-sions. Neither is any liability assumed for damages resulting from the use of the information contained herein.

International Standard Book Number: 0-7897-1746-8 Library of Congress Catalog Card Number: 98-85654 Printed in the United States of America

First Printing: September, 1998 01 00 99 4 3 2 1

Trademarks

All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Que Corpora-tion cannot attest to the accuracy of this informaCorpora-tion. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.

Warning and Disclaimer

(5)

v Contents

Contents at a Glance

Introduction 1

I

Installing Linux

1 Understanding Linux 13 2 Linux Installation Overview 29 3 Installing Red Hat 57

4 Installing Caldera OpenLinux Lite 87 5 Running Linux Applications 105

6 Upgrading and Installing Software with RPM 145

II

System Administration

7 Understanding System Administration 163 8 Using the vi Editor 177

9 Booting and Shutting Down 205 10 Managing User Accounts 219 11 Backing Up Data 225

12 Improving System Security 235 13 Configuring the Linux Kernel 253

III

Managing the File System

14 Managing File Systems 265 15 Using Samba 291

16 Understanding the File and Director y System 303 17 Managing Files and Directories 317

IV

Working with Linux

18 Understanding Linux Shells 337 19 Managing Multiple Processes 381 20 Printing 405

21 Installing the X Windows System 421 22 Using X Windows 439

V

Network Administration

(6)

25 Configuring Domain Name Service 501 26 Configuring Electronic Mail 517 27 Configuring a Usenet News Service 517 28 Using the emacs Editor 539

VI

Using the Internet

29 Using SLIP and PPP 561

30 Accessing the Network with telnet, ftp, and the r- Commands 577 31 Surfing the Internet with the World Wide Web 595

32 Creating Web Documents with HTML 609 33 Using Electronic Mail 629

34 Surviving Usenet News 655

VII

Setting Up a Linux Web Server

35 Getting Started with Apache 671 36 Configuring Apache 683

37 Managing an Internet Web Server 709

VIII

Appendixes

A Sources of Information 721 B The Linux HOWTO Index 729

C The Linux Hardware Compatibility HOWTO 745 D The GNU General Public License 799

E Installing StarOffice 807 F What’s on the CD-ROM 823

(7)

vii Contents

Table of Contents

Introduction

1

Who Should Use This Book? 3 Who Should Not Use This Book? 4 Hardware Needed to Use This Book 4 How to Use This Book 6

Part I: Installing Linux 6 Part II: System Administration 6 Part III: Managing the File System 7 Part IV: Working with Linux 7 Part V: Network Administration 8 Part VI: Using the Internet 8 Part VII: Setting Up a Linux Web Server 8

Appendixes 9

Conventions Used in This Book 9

I Installing Linux

1 Understanding Linux

13

What Is Linux? 14 Why Use Linux? 15 Linux Distributions 16 Advantages of Using Linux 17

Open Systems Portability 17

Disadvantages of Using Linux 19 Lack of Technical Support 20 Hardware Problems 20

Inability to Use Current Software 20 Lack of Experience 21

Overcoming the Disadvantages 21 Disappearing Disadvantages 22

The Commercial Side of Linux 22

Commercial Programs from Red Hat 22 Commercial Programs from Caldera 22 A Brief History of Linux 23

AT&T 23 BSD 24 USL 24

XENIX, SunOS, and AIX 24 Linux 25

Who Owns Linux? 26 From Here… 27

2 Linux Installation Overview

29

Understanding Linux’s Hardware Starting the Installation Process 37 Understanding the Various Installation Methods 38

Compiling Needed information 39 Creating the Boot and Supplemental Disks 41

Partitioning Your Hard Drive 42 Understanding Partitions 42 Using FDISK 43

(8)

3 Installing Red Hat

57

Starting the Installation Process 58 Understanding the Various Installation Methods 59

Compiling Needed Information 60 Creating the Boot, Supplemental, and Rescue Disks 61

Installing the Linux System 62 Using the Linux fdisk Program 67 Adding the Necessary Partition 70 Creating the Swap Partition 72 Using Disk Druid 73

Installing the Software Components 75 Configuring Your System 77

Configuring Your Network 79

Configuring the TCP/IP Network 79 Configuring the Clock 79

Selecting the Services to Start on Reboot 80

Selecting Your Root Password 82 Installing LILO 82

Installing Red Hat Linux on DEC Alphas 83

Using Supported Alpha Hardware 83 Creating the Boot and Root Disks 84 Installing the Main Red Hat

Distribution 85

Going Back to the Beginning 85 Troubleshooting Problems 86 From Here… 86

4 Installing Caldera OpenLinux

Lite

87

What You Need to Install Linux 88 Installation 89

Making the Preparations 89

Preparing the Installation Floppies 90 Creating the Install and Modules Disks 90

Installing Linux 91

Using a Previous Configuration 91 Configuring LISA 92

Probing for Hardware 92 Preparing the Hard Disks 94 Using the Linux fdisk Program 95 Adding the Necessary Partition 97 Creating the Swap Partition 99 Installing the Linux Software System 99 Configuring Your System 100

Installing LILO 101 Uninstalling LILO 101 Going Back to the Beginning 102 Resolving Problems 102

From Here… 103

5 Running Linux Applications

105

Maneuvering Through Linux 106

Logging In and Out 108

Adding Users Under Slackware 108 Adding Users with Red Hat 111 Using Red Hat’s Control Panel to Manage Users 111

Changing Passwords 113 Using Basic Commands 114

Getting Help for Commands with man 114

Using Directory-Manipulation Commands 114

Using File-Manipulation Commands 116

Dealing with DOS Files Under Linux 118 Shutting Down Linux 119

Running Linux Programs 120 Using the workbone CD Player 120 Using the sc Spreadsheet

(9)

ix Contents

Using the bc Calculator 122

Using the minicom Telecommunications

Running DOS Programs Under Linux 127 Installing DOSEMU 127

6 Upgrading and Installing Software

with RPM

145

Understanding Key Terms Used in This Chapter 146

Using the Red Hat Package Manager 149 Locating Packages 150

Installing Packages with RPM 150 Uninstalling Packages with RPM 151 Updating Packages with RPM 152 Querying Packages with RPM 152 Verifying Packages with RPM 153 Installing Non-Linux Software 154

Understanding the Importance of Proper Administration 164

Performing Administration in a Networked Environment 172

Defining the Role of the Network Administrator 172

8 Using the vi Editor

177

Introducing vi 178 What Is vi? 179

Understanding the Editing Process 180 Using vi 181

Looking at vi’s Two Modes 182 Creating Your First vi File 182 Starting vi by Using an Existing File 183

Exiting vi 184

Undoing a Command 186

(10)

Positioning the Cursor 189 Adding Text 191

Deleting Text 193 Searching 194

Changing and Replacing Text 195 Copying, Cutting, and Pasting 197 Repeating Commands 199 vi Command Summary 199 Setting the vi Environment 201

Using set to See and Set Options 203 Setting the showmode Option 203 Setting Toggle Options 203 Changing Options for Every vi Session 204

From Here… 204

9 Booting and Shutting Down

205

Understanding the Boot Process 206 Booting Linux from a Floppy 212 Booting from a Boot Manager 213 Understanding LILO, the Linux

10 Managing User Accounts

219

Working with Users 220 Adding a User 220

Using the adduser Command 221 Setting User Passwords 221

11 Backing Up Data

225

Considering Backup Issues 226 Considering Backup Tips 227 Planning a Backup Schedule 227 Performing Backups and Restoring Files 229

Using tar 229 Using cpio 232 From Here… 233

12 Improving System Security

235

Handling Physical Security 236 Dealing with Password Security 237 Developing Login Security 238

SUID and SGID Programs 241 Avoiding Social Engineering Threats 242 Recording Use of the su Command 243 Developing a Secure System 243

Security Threats 243 Controlling the Root 244

(11)

xi Contents

Shadow Passwords: What Good Are They? 248

The /etc/password and /etc/shadow Files 249

Adding, Changing, and Deleting Users with Shadowed Passwords 249 From Here… 251

13 Configuring the Linux Kernel

253

Preparing to Build a New Kernel 254 Configuring a New Kernel 255

The Interactive Text-Based Program 255

Using the Menu-Based Program 256 Using the X Windows-Based

Program 257

Compiling the New Kernel 258 Building a Modularized Kernel 259

Working with Kernel Modules 260 Restarting kerneld 262

From Here… 262

III Managing the File System

14 Managing File Systems

265

Understanding File Systems 266 Mounting and Unmounting File Systems 269

Mounting File Systems Interac-tively 270

Mounting File Systems at Boot Time 271

Unmounting File Systems 273 Understanding the Network File System 274

Exporting an NFS File System 274 Understanding the /etc/exports File 275

Mounting NFS File Systems 277 Maintaining File Systems 278

Using the fsck Command 279

Creating and Formatting File Systems 280 Using fdisk to Create Disk

Parti-tions 280

Using mkfs to Build a File System 286 Using Swap Files and Partitions 288

Creating a Swap Partition 288 Creating a Swap File 289 From Here… 289

15 Using Samba

291

Installing Samba 292

Configuring Samba on Linux 293 The [global] Section 297 The [homes] Section 297 The [printers] Section 298 Sharing Directories 298 Testing the smb.conf File 299 Running the Samba Server 300 Using smbclient 300

From Here… 302

16 Understanding the File and Directory

System

303

Understanding File and Path Names 304 File Types 306

Ordinary Files 306 Directory Files 307

(12)

Copying Files 322

Moving and Renaming Files 323 Removing Files or Directories 323 Viewing the Contents of a File 325

Using cat to View a File 326 Using more to View a File 326 Using less to View a File 326

Searching Through a File and Escaping to the Shell 327

Viewing Files in Other Forms 327 Searching for Files 329

Changing File Time and Date Stamps 331 Compressing Files 332

From Here… 333

IV Working with Linux

18 Understanding Linux Shells

337

Logging In 338

Understanding Shells 339 Looking at Different Shells 339 Configuring Your Login Environ-ment 341

Understanding Processes 349 Understanding Shell Command Parsing 350

Using Commands, Flags, and Param-eters 351

Performing Filename Matching 352 Connecting Processes with Pipes 355 Redirecting Input and Output 355 Substituting Shell Variables 356 Substituting Command Results 357 Regular Expressions 358

Understanding Command Groups, Subshells, and Other Commands 360 Doing Background Processing 361

Arranging for Processes to Run in the Background 361

Using the nohup Command 362 Using the cron Daemon 362

Understanding Command Feedback 363 Editing and Aliasing Shell Commands 364

Editing Commands 364 Viewing Command History 364 Aliasing Commands 364 Completing Commands 365 Adding Text with Cut and Paste 365 Working with Shell Scripts 365

Writing Programs with the Shell 367 Programming with Control

Structures 371

Customizing Linux Shells 378 Exporting Variables to the New Shell 378

Defining Command Aliases 380 From Here… 380

19 Managing Multiple Processes

381

Understanding Multitasking 382 Initiating Multiple Processes 384

Starting Multiple Processes 384 Starting a Background Process 384 Using Pipes to Start Multiple Processes 385

Using the Scheduling Commands 385 Running Commands at Specified Times with at 386

Running Long Tasks with batch 388 Scheduling Commands with cron and crontab 388

Reporting On and Monitoring the Multitasking Environment 391

Finding Out Who’s on the System with who 392

Reporting On the Status of Processes with ps 394

Controlling Multiple Processes 397 Using nohup with Background Processes 398

(13)

xiii Contents

Scheduling the Priority of Running Processes with renice 399

Terminating Processes with kill 400 From Here… 403

20 Printing

405

Selecting a Printer to Work with Linux 406 Knowing What You Need to Configure Printers 406

Knowing How Printing Works Under Linux 406

Understanding the Important Programs for Printing 407

Understanding the Important Files 410 Understanding the /etc/printcap File 411

Understanding the Fields in /etc/printcap 412

Setting the PRINTER Environment Variable 413

Creating a Test printcap Entry 413 Putting It All Together 414 Configuring Red Hat Printers 416 From Here… 419

21 Installing the X Windows

System

421

Understanding X Windows 422

What Is a Client/Server System? 424 Output Capabilities 424

User Interface Capabilities 425 Input Capabilities 425

Installing the XFree86 System 425 Installing the Software 425

Ensuring Hardware Suppor t for XFree86 427

Installing the X System with pkgtool for Slackware 429

Configuring XFree86 430

Running the SuperProbe Program 431 Understanding the XF86Config

Sections 431

Running the xf86Config Program 437 Running X in -probeonly Mode 437 Using the X Windows Resource Files 438 From Here… 438

22 Using X Windows

439

Navigating X Windows 440 Using Menus 440

Using Virtual Terminals in X Windows 440

Using Window Managers for Linux 441 twm 441

Using X Applications in Red Hat 444 nxterm 446

xv 446

Using X Windows Applications with Slackware 96 448

Having Fun with DOOM for Linux 458 Installing DOOM 458

(14)

V Network Administration

23 Understanding the TCP/IP Protocol

Suite

463

The History of TCP/IP 464 Internet Terminology 464 The Open Systems Interconnection Model 466

The TCP/IP Protocol Stack 468 IP Addresses 469

IP Address Classes 470 Network Naming 472 NIC Naming Tree 473

Subnetworks and Subnet Masks 474 Routing 475

Routing Information Protocol (RIP) 476

Network Segmentation 476 Internet Network Setup 477

Understanding the Types of Connec-tions 477

Choosing a Networking Configura-tion 480

Understanding Network Configuration Guidelines 481

Using Routers and Bridges 481 From Here… 482

24 Configuring a TCP/IP Network

483

Understanding the TCP/IP Configuration Files 484

The /etc/hosts File 484 The /etc/networks File 485 Initializing Ethernet Interfaces 486

Using ifconfig to Inspect a Network Interface 488

Configuring the Software Loopback Interface 488

Configuring a Network Interface 488 Configuring Parallel IP Interfaces 489

Understanding TCP/IP Routing 489 Deciding On a Routing Policy 489 Using the /sbin/route Program 490 Monitoring a TCP/IP Network with netstat 493 Using the named Daemon to Set Up the Server 506

26 Configuring Electronic Mail

517

An Overview of Electronic Mail 518 History and General Concepts 518 The Shared-File Messaging Model 518 The Client/Server Messaging

Model 519

MUAs, MTAs, and MDAs 519 The IETF Requests for Comment 520 Internet Protocols 522

(15)

xv

27 Configuring a Usenet News

Service

531

A Usenet Primer 532

History and Origins of Usenet 532 Usenet Structure 532

Configuring Usenet Clients 534 NN and TIN 534

Pine 535 From Here… 537

28 Using the emacs Editor

539

Starting emacs 540 Using emacs 541

Looking Over the emacs Screen 542 Creating Your First emacs File 542 Starting emacs by Using an Existing File 543

Exiting emacs 544 Undoing a Command 546

Writing Files and Saving the Buffer 547 Using Files 547

Positioning the Cursor 548 Adding Text 550

Deleting Text 550

Searching and Replacing Text 551 Copying, Cutting, and Pasting 554 Basic Command Summary 555 Customizing emacs 557 From Here… 557

VI Using the Internet

29 Using SLIP and PPP

561

Understanding the Requirements for SLIP and PPP 562

Using dip to Automate SLIP Opera-tions 562

Using dip in Command Mode 563 Using dip with Static IP Addresses 566 Using dip with Dynamic IP

Addresses 567

Using diplogin to Provide SLIP Service 568

Creating SLIP Accounts 568 Using the /etc/diphosts File 568 Using PPP 569

Automating PPP Links with pppd and chat 569

Providing PPP Service 573 Keeping Your PPP Link Secure 574 From Here… 575

30 Accessing the Network with telnet,

ftp, and the r- Commands

577

Using telnet to Access Remote Computers 578

telnet Command Summary 578 Sample telnet Session 579

Using FTP for Remote File Transfer 580 Anonymous FTP 580

ftp Command Summary 581 A Sample FTP Session 585

A Sample Anonymous FTP Session 586 Using the r- Commands 589

rlogin 589 rsh 590 rcp 591 ssh 592 From Here… 594

31 Surfing the Internet with the

World Wide Web

595

Introducing the World Wide Web 596 Understanding the Web’s Structure 596 Understanding URLs 597

Searching the Web 598

(16)

Using archie with a Web Browser 602 Using telnet with a Web Browser 604 Using gopher with a Web Browser 605 Accessing Usenet News with a Web Browser 606

Getting on Mailing Lists 606 Finding Mailing Lists 607 Using Mailing Lists 607

Using Wide Area Information Servers (WAIS) 608

From Here… 608

32 Creating Web Documents with

HTML

609

Understanding HTML 610 Working with HTML 610 Using Basic HTML Elements 614

Tags 614

Organizing Information with Lists 620 Linking Pages with Anchors 623 Using Graphics 625

From Here… 628

33 Using Electronic Mail

629

Understanding E-Mail 630 Sending E-Mail with mail 632

Writing a Message While Sending E-Mail 633

Canceling a Message 633 Sending a Prepared Message 634 Sending the Result of a Command or Program by E-Mail 635

Reading Your Mail 635 Using mail to Read Mail 635 Reading E-Mail from Other Files 637 Sending Mail While Reading 638

Printing Mail Messages 638 Getting Help with mail 638

Saving E-Mail to Files with mail 639 Deleting and Undeleting Messages with mail 640

Replying to E-Mail with mail 641 Routing Mail to Others 643

Forwarding Messages 643 Sending a Copy with mail 644 Using Aliases and Mailing Lists 645 Customizing Your mail Environment 646 Quitting the mail Program 647

Quitting and Saving Changes 648 Quitting and Not Saving Changes 648 Using the elm Mailer 649

Starting elm 649

Using elm Commands 650 Using the Mutt E-Mail Client 652

Where to Get Mutt 652

For More Information on Mutt 652 From Here… 653

34 Surviving Usenet News

655

What Is Usenet News? 656 A Usenet Glossary 656 A Brief History 658

How Usenet Is Structured 659 Group Hierarchies 659 News Distributions 660 No Central Authority 661 Usenet Culture 661

Lack of Visual Reference 662 Newsgroup Culture 662 Reading and Posting News 663

Subscribing to Newsgroups 663 Reading News 664

(17)

xvii Contents

Using the rn News Reader 667 From Here… 668

VII Setting Up a Linux Web Server

35 Getting Started with Apache

671

Compiling Apache 672

Step 1: Edit the Configuration File 672 Step 2: Run the Configure Script 673 Step 3: Run make 673

Establishing the File Hierarchy 673 Performing a Basic Configuration 674

httpd.conf 675

Open File Error Messages 679 Port and Bind Error Messages 680 Bad User or Group Name

Messages 680

Initial Ser ver Startup Error Messages 680

Alias, ScriptAlias, and Redirect 687 A Better Way to Activate CGI Scripts 688

37 Managing an Internet Web

Server

709

Controlling Server Child Processes 710 Using the Scoreboard File 711

Increasing Efficiency in the Server Software 712

Using Server-Side Includes 712 Using .htaccess Files 712 Using .asis Files for Server-Push Animations 713

A Sources of Information

721

Linux Web Sites 722 Usenet Newsgroups 722 Online Documents 725

(18)

Magazines 726 Linux FTP Sites 726 Contacting InfoMagic 727 For Linux Developers 727

B The Linux HOWTO Index

729

What Are Linux HOWTOs? 730 Where Do I Get Linux HOWTOs? 730

HOWTO Translations 730

Writing and Submitting a HOWTO 741 Copyright 743

C The Linux Hardware Compatibility

HOWTO

745

SVGALIB (Graphics for Console) 750 XFree86 3.3.1 750

S.u.S.E. X-Server 751 Commercial X Ser vers 752 Controllers (Hard Drive) 767

Non-Intelligent Cards - Supported 771 Intelligent Cards - Supported 771 Others 771

VESA Power Savings Protocol (DPMS) Monitors 784

(19)

xix Contents

Terminals on Serial Port 784 Joysticks 784

Video Capture Boards / Frame Grabbers / TV tuner 784

Related Sources of Information 787 Acknowledgments 787

Appendix A. S3 Cards Supported by XFree86 3.3.1. 787

Appendix B. Supported PCMCIA Cards 789

Appendix C. Plug and Play Devices 795 Appendix D. Linux Incompatible Hardware 795

Glossary 796

D The GNU General Public

License

799

The GNU License 800 Preamble 801

GNU General Public License Terms and Conditions for Copying, Distribution, and Modification 801

How to Apply These Terms to Your New Programs 805

Checking File Permissions and Library Versions 809

Using Different Linux Systems 810

Starting Setup for a Single-User Installation 811

Reviewing the License Agreement 812 Choosing an Installation Option 813 Using the Custom Installation Option 814

Deciding Where to Put StarOffice 815 Entering Your User Information 816 Preparing for a Network Installation 817

The Server Side of a Network Installation 817

The Client Side of a Network Installation 818

Updating or Removing the StarOffice Installation 819

F What’s on the CD-ROM

823

Red Hat Linux 5.1: Award Winning Operating System 824

Caldera OpenLinux Lite 1.2 and StarOffice 4.0 for Linux 824

Caldera OpenLinux Lite 1.2 824 StarOffice 4.0 825

About the Software 825

(20)

About the Authors

Jack Tackett, Jr. is the Manager of System Operations for Nortel’s Information Network, the leading outsource provider of Virtual Private Networks in the VPN industry. When not herding his system administrators (a practice very similar to herding cats), he sometimes breaks away to write (another practice very similar to herding cats and usually just as rewarding ;-). He fights for living space with his loving wife and their two dogs and three cats in Cary, NC. He invites your comments at tackett@netwharf.com.

(21)

xxi Contents

Dedication

From Jack Tackett

To my wife Peggy and to my Mom, Mary Louise—love always.

From Steve Burnett

To my mother.

Acknowledgments

From Jack Tackett:

First, I want to thank all the readers of the first three editions for their patronage and for their helpful and insightful comments. Your comments are important and make a difference; you have made this a better project!

I want to say thank you for the tremendous efforts put forth by the Linux developers scattered across the globe. I also want to acknowledge the fine contributions begun by Linus Torvalds and continued by so many others around the world—thanks for creating Linux and breathing life into such a monumental effort! Also, thanks to Matt Welsh, et al., for the work on the Linux Documentation project. Also, a big thanks to the fine folks at Red Hat for their help in prepar-ing this edition—and for a great lunch at Kanki’s!

Next, I want to express my regards for the people at the Que Continuum. I especially want to thank Jane Brownlow and Mark Cierzniak for their help in getting this project off the ground and finished.

To Steve Burnett for stepping in at the last minute to provide aid and assistance to a haggard cat herder. Also thanks to Paul Barrett for his initial help with the research that eventually led to this book. And also thanks to David Gunter for his efforts with the first three editions. To my friends Paul Barrett, Keith E. Bugg, Gregg and Beckie Field, Dave and Lola Gunter, Israel Janovich, Dianna Smith, Kell and Joy Wilson, Britney, Vicki, and Binh, and finally Joe Williams: Thanks for the memories! Thanks to my combined family—the Tacketts and the Martins—for their support in all my endeavors. Also, a big thank you to the best cousins in the world—Bill and Hope Tackett, Jr.

I’d like to thank my best instructor, Dr. Joe Daugherty of the University of North Carolina-Asheville. Also thanks to Myrtice Trent of the Blue Ridge Technical Community College. Thanks for the help and encouragement you both provided.

Next a great big thank-you to my coworkers at Nortel’s Information Network for picking up the slack while I revised this book—thank you to everyone!

(22)

From Steve Burnett

First, without the mammoth amount of work put into Linux by Linus Torvalds and the rest of the Linux development community, there would be nothing to write about here. Since the first release, Linux has grown into a robust operating system that is used to meet a wide variety of needs, from home hobbyists up through business usage central to those companies. Secondly, without Jack and David’s work on the previous editions, there wouldn’t have been a book to invite me to help revise. Jack, thanks for inviting me in on this project. Although electronic mail works great, living within a local call range of each other helped keep my bills down while we tried to coordinate our actions.

(23)

xxiii Contents

Tell Us What You Think!

As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’re willing to pass our way. As the Executive Editor for the Operating Systems team at Macmillan Computer Publishing, I welcome your comments. You can fax, email, or write me directly to let me know what you did or didn’t like about this book—as well as what we can do to make our books stronger.

Please note that I cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail I receive, I might not be able to reply to every message.

When you write, please be sure to include this book’s title and author, as well as your name and phone or fax number. I will carefully review your comments and share them with the author and editors who worked on the book.

Fax: 317-581-4663 Email: opsys@mcp.com Mail: Executive Editor

Operating Systems

Macmillan Computer Publishing 201 West 103rd Street

(24)
(25)

1

Introduction

L

I N T R O D U C T I O N

inux 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 com-puters. As Linux evolves, one has to keep up with the changes; that’s why you will find plenty of new material in this fourth edi-tion of the popular Special Ediedi-tion Using Linux.

(26)

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 commer-cial 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.

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 ■

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.

N O T E

(27)

3

Probably the first order of business is to help you pronounce the word Linux. To most Ameri-cans, the pronunciation is LEN-nucks, with the shor t 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, config-uring, 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 inter-national 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 pro-grams 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, al-though 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.

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 necessar y 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 mar velous utilities, bundled with the newest communications capabilities and graphical user interfaces (GUIs).

Who Should Use This Book?

(28)

The UNIX of today promises again to revolutionize the personal computer industr y, and per-haps 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 standard-ization 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 be-come 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 begin-ning 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.

(29)

5

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 suppor ted.

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.

(30)

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 informa-tion 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 instruc-tions 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 over view 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.

(31)

7

■ 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 produc-tive 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.

(32)

■ Chapter 22, “Using X Windows,” provides you with information necessar y 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 necessar y 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 over view of electronic mail (e-mail) and how to use it in Linux.

■ Chapter 34, “Sur viving 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:

(33)

9

■ 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 supplementar y 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 impor tant details on the hardware suppor ted 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 con-ventions 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 ap-pears 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.

(34)

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 follow-ing 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 informa-tion 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:

(35)

I

P A R T

Installing Linux

1

Understanding Linux

13

2

Linux Installation Overview

29

3

Installing Red Hat

57

4

Installing Caldera OpenLinux Lite

87

5

Running Linux Applications

105

(36)
(37)

13

1

I

Part

Ch C H A P T E R

Understanding Linux

by Jack Tackett

1

I

n this chapter

What Is Linux?

14

Why Use Linux?

15

Linux Distributions

16

Advantages of Using Linux

17

Disadvantages of Using Linux

19

The Commercial Side of Linux

22

A Brief History of Linux

23

(38)

To understand Linux, you must first understand the question, “What is UNIX?” The reason is that Linux is a project initiated to create a working version of UNIX on Intel-based machines, more commonly referred to as IBM PC-compatible computers that most people are familiar with.

UNIX is arguably the most versatile and popular operating system found today on scientific and high-end workstations. This chapter explains why you may want to select the UNIX-like Linux instead of one of the other operating systems available for Intel platforms, such as MS-DOS, Windows 95/98, Windows NT, or OS/2.

What Is Linux?

Linux is an operating system for several types of computer platforms, but primarily for Intel-based PCs. The system has been designed and built by hundreds of programmers scattered around the world. The goal has been to create a UNIX clone, free of any commercially copy-righted software, which the entire world can use.

Actually, Linux started out as a hobby of Linus Torvalds while he was a student at the Univer-sity of Helsinki in Finland. He wanted to create a replacement for the Minix operating system, a UNIX-like operating system available for Intel-based PCs.

We’ll explain many of the terms used within the chapter later, so don’t worry if some of them are unfamiliar to you now. ■

Linux is basically a UNIX clone, which means that with Linux you get many of the advantages of UNIX. Linux multitasking is fully preemptive, meaning that you can run multiple programs at the same time, and each program seems to process continuously. Other systems, such as Microsoft Windows 3.1, allow you to run multiple programs, but when you switch from one program to another, the first program typically stops running. Microsoft’s Windows 95 and Windows NT are more like Linux because they allow preemptive multitasking. Linux allows you to start a file transfer, print a document, copy a floppy, use a CD-ROM, and play a game— all at the same time.

Linux is fully multiuser capable, which means that more than one person can log in to and use the system at the same time. Although the multiuser feature may not be very useful at home, it gives many people in a corporate or university setting access to the same resources at the same time, yet eliminates the need to duplicate expensive machines. Even at home, you’ll find the capability to log in to separate accounts on what are called vir tual terminals ver y useful. Also from home, you could provide your own personal online service by using Linux and several modems.

◊ See “Managing Users,” p. 107

(39)

15

1

I

Part

Ch CD-ROMs, including hundreds of applications. And on the third CD-ROM, you’ll also find an

integrated office productivity pack called StarOffice (also from Caldera).

Linux provides a learning opportunity unparalleled today. Here you have a complete working operating system, including source code, with which to play and learn what makes it tick. Learning what makes Linux tick is something you can’t do in a typical UNIX environment, and it’s definitely something you can’t do with a commercial operating system because no vendor is willing to just give away the source code.

Finally, Linux gives you a chance to relive—or perhaps experience for the first time—the chaos of the early PC revolution. In the mid-1970s, computers were the provinces of large organiza-tions, such as the government, big business, and universities. The ordinary person had no access to these marvels. But with the introduction of the microprocessor and the first personal computers, things changed. At first, PCs were the province of the hackers —dedicated com-puter enthusiasts—who hacked the early systems because those systems could do very little in the way of productive work. But as the hackers experimented and became entrepreneurs, and as the capabilities of PCs increased, PCs became commonplace.

The term “hacker” has unfortunately taken on a negative connotation in today’s society. See the section “Hackers” later in this chapter for more details on hackers and crackers. ■

The same is true today of system software (that is, operating systems). Linux represents a breakaway from a system controlled by large organizations that stifle creativity and enhance-ments in the name of market share.

Why Use Linux?

You’ll want to use Linux because it’s the only operating system today that’s freely available to provide multitasking and multiprocessing capabilities for multiple users on IBM PC-compatible hardware platforms. No other operating system gives you these same features with the power that Linux enjoys. Linux also separates you from the marketing whims of the various commer-cial providers. You aren’t locked into upgrading every few years and paying outrageous sums to update all your applications. Many applications for Linux are freely available on the Internet, just as the source code to Linux itself is available on the Internet. Thus, you have access to the source code to modify and expand the operating system to your needs—something you can’t do with commercial operating systems such as Windows NT, Windows 95, MS-DOS, and OS/2. Freedom from commercial vendors is also a potential downside to using Linux. Because no single commercial vendor supports Linux, getting help isn’t just a phone call away. Linux can be finicky and may or may not run properly on a wide range of hardware. The potential to damage or delete data files residing on your system also exists because Linux is constantly changing and doesn’t go through a rigorous testing process before it’s released.

Linux isn’t a toy; it’s a system designed to give users the feeling of tinkering with a new project, just like in the beginning of the PC revolution. However, Linux is relatively stable on many systems and presents you with an inexpensive opportunity to learn and use one of the most N O T E

(40)

popular operating systems in the world today—UNIX. Many CD-ROM vendors and software companies, such as Red Hat and Caldera, now support the Linux operating system. Linux is an alternative to other UNIX systems and can be used in place of those sometimes-expensive systems. If you program on UNIX systems at work, for example, you might want a UNIX-like system at home. Are you a systems administrator of a UNIX system at work? If so, you can perform some of your duties from home by using Linux. Or do you not have a clue as to what UNIX is? Well, then, Linux provides a low-cost introduction to one of the most popular operat-ing systems in the world—UNIX.

Linux also provides you with easy access to the Internet and the rest of the information super-highway.

Linux Distributions

Linux is distributed by many different organizations, each of which provides a unique collec-tion of programs along with the core group of files that constitutes a Linux release. The current release of Linux on the accompanying CD-ROMs is kernel version 2.0.34. This distribution may also contain experimental kernels with drivers for unique hardware. Under Red Hat, the ker-nels are part of the Red Hat Package Management system (RPMs) and are installed as part of the system. Caldera’s OpenLinux follows the same scheme because it is based on the Red Hat distribution.

Luckily for you, by having bought this book, you’ve made the decision of which distribution to use rather easy. The three CDs accompanying this book offer complete versions of both Red Hat’s and Caldera’s distributions (the companies’ Internet versions, not the ones sold commer-cially). However, other distributions such as the following are available on the net:

■ MCC Interim Linux ■ TAMU Linux

■ LST

■ SLS

■ Debian Linux

■ Yggdrasil Plug-and-Play Linux CD-ROM and the Linux Bible ■ Trans-Ameritech Linux plus BSD CD-ROM

■ The Linux Quarterly CD-ROM ■ Caldera (this vendor uses Red Hat’s)

(41)

17

1

I

Part

Ch

Advantages of Using Linux

Using Linux has many advantages. Of the many operating systems available today, Linux is the most popular free system that’s widely available. For the IBM PC, Linux provides a complete system with built-in multiuser and multitasking capabilities that take advantage of the entire processing power of your 386 and higher computer systems.

Linux comes with a complete implementation of the TCP/IP networking protocol. With Linux, you can connect to the Internet and the vast wealth of information it contains. Linux also pro-vides a complete e-mail system to send messages back and forth through cyberspace.

Linux also has a complete graphical user interface (GUI), XFree86, that’s based on the popular X Windows system. XFree86 is a complete implementation of the X Windows system that can be distributed free of charge with Linux. XFree86 provides the common GUI elements you find on other commercial GUI platforms, such as Windows and OS/2.

Today, all of this is available for Linux and is basically free. All you have to pay is the price for acquiring the programs from the Internet or via mail order (available from several different vendors). Of course, because you’ve purchased this book, you already have the entire Linux system on the accompanying CD-ROMs.

Open Systems Portability

In the never-ending quest for standardization, many organizations have taken a renewed inter-est in the direction in which operating systems are developing. UNIX hasn’t gone unnoticed. The drive to standardize UNIX stems from the many UNIX variants now available. You’ll learn more about how those variants were developed in the following section.

Efforts have been made to combine, collate, and otherwise absorb all versions of UNIX into a single all-encompassing version of the operating system. Initially, the effort met with guarded enthusiasm, and some effort was expended on coming to terms with blending the different versions. As with many noble efforts, this one was doomed to failure because developers weren’t willing to sacrifice part of what they had already invested in their par ticular versions. (Sadly enough, many developers still feel that way.)

However, the continued existence of UNIX varieties isn’t necessarily cause for alarm. Despite the different varieties, all are still inherently superior to all other operating systems available today because each contains the same elements described in the preceding pages.

Por tability is merely the capability to transport an operating system from one platform to an-other so that it still performs the way it should. UNIX is indeed a portable operating system. Initially, UNIX could operate on only one specific platform—the DEC PDP-7 minicomputer. Today, the many UNIX variants can operate in any environment and on any platform, from laptops to mainframes.

Portability provides the means for different computer platforms running UNIX to communicate accurately and effectively with any of the other platforms. These systems can do this without the addition of special high-priced after-market communications interfaces. No other operating system in existence can make this claim.

(42)

Applications

Although using an operating system is sometimes fun in and of itself, it isn’t the reason most people use a computer. Most people need to do productive work with their computers. Linux has literally thousands of applications available today, including programs for spreadsheets, databases, word processing, application development in a variety of computer languages, and telecommunications packages to get you online. Linux also comes with a wide range of games, both text- and graphics-based. When you need a break from the drudgery of the daily grind, Linux can provide a few minutes (or hours) of relaxation.

Advantages for Computer Professionals

If you’re a computer professional, Linux provides a wealth of tools for program development. It includes compilers for many of the top computer programming languages today, such as C, C++, and Smalltalk. If you don’t like those languages, Linux provides you with tools, such as Flex and Bison, that you can use to build your own computer languages. These tools come with the CD-ROMs accompanying this book, but their commercial counterparts can cost several hundred dollars each. If you want to learn one of the aforementioned languages but don’t want to spend hundreds of dollars for another compiler, Linux and its development tools are for you. Linux also allows you to communicate with your company’s office systems. And if you’re a UNIX systems administrator, Linux can help you perform your duties from home. Although working from home is just in its infancy, perhaps some day you can use Linux to do your job at home and then only occasionally visit the office for personal meetings.

Two of the industry’s buzzwords are open systems and interoperability, both of which refer to the capability of many different systems to communicate with one another. Most open systems specifications require POSIX (Portable Operating System Interface) compliance, which means some form of UNIX. Linux meets those standards today. In fact, Linux was designed for source-code portability, so if you have a corporate program running on one version of UNIX, you should be able to port that system relatively quickly to a system running Linux.

Corporations are insisting on these types of open systems so that they aren’t locked into using any one vendor. Remember the old adage “Don’t put all your eggs in one basket?” Corporations today are becoming leery of systems controlled by single companies because those in control can dictate how the software behaves and what hardware systems the software supports. If that company chooses a direction that’s not good for your corporation, tough luck. You’re stuck with that company’s decision whether you like it or not. With UNIX/Linux and open systems, however, you’re in control of your own destiny. If the operating system doesn’t have a feature you need, plenty of consultants are available who can make the necessary changes, which is possible because you have the source code to your operating system.

Education

(43)

19

1

I

Part

Ch limitless wealth of information there. You also have access to thousands of experts in a wide

variety of subjects who can answer your questions. Linux can be useful, even if your major isn’t computer science.

Linux provides such advantages for so little because of the spirit and philosophy of the commu-nity that built and continues to build Linux. Linux is a great experiment that took on a life of its own. Literally hundreds of computer hackers from around the world contributed to its develop-ment. Linus Torvalds first developed what became Linux for himself and later released his brainchild to the world under the GNU copyleft.

◊ See “The GNU License,” p. 800

Hackers

At the basic level, Linux is a system built by and for hackers. The popular definition of hacker has a negative connotation in today’s society, but computer hackers aren’t criminals by their definition of the word. Their definition deals with how one approaches any activity in life—not just when dealing with computers. Hackers feel a certain depth of commitment and an en-hanced level of excitement at hacking a system. Hacking basically means learning all there is to know about a system, becoming immersed in the system to the point of distraction, and being able to fix the system if it breaks.

Hackers basically want to know how a system they find interesting works. Most are not inter-ested in making money or seeking revenge, although certain hackers do cross that line to become what the hacker community calls crackers. Computer hackers become outraged when they’re compared with these vandals and criminals the popular media now calls hackers (in-stead of crackers). Hopefully, Linux gives you a feeling of what it’s like to be a hacker, and ide-ally, you will avoid becoming a cracker.

If you’re simply the curious type and want to learn more about UNIX, Linux is for you. Here is a fully functional version of UNIX to which you have free, unrestricted access—something you seldom find in the real world. Most UNIX users are given accounts on UNIX machines that grant them only limited rights and privileges, and in such cases, a normal user can’t use or experiment with certain UNIX/Linux commands. But this isn’t conducive to learning all about UNIX. With Linux, however, you have complete run of the place and can do what you want whenever you want. Of course, with this great power comes great responsibility: You must learn how to manage a real UNIX system, which can be fun in and of itself.

Disadvantages of Using Linux

Perhaps the biggest disadvantage of using Linux is the fact that no single corporate entity is in charge of its development. If something goes wrong or you have a problem, no toll-free techni-cal support numbers are available that you can techni-call for help. But when you really think about it, do such numbers provide real support for current commercial systems? How often are you referred elsewhere—providing you get through to tech support—to have your question an-swered? How many times are you asked to post a question on an online ser vice to get help? Well, with Linux, although there’s no tech support number, there are literally thousands of

Gambar

Table 1A Brief List of Hardware Supported by Linux
Table 2.1Video Chipsets Supported by Linux
Table 2.4Red Hat Errata Listing
FIG. 2.3
+7

Referensi

Dokumen terkait

Rumusan masalah dalam penelitan skripsi ini adalah (1) Adakah pengaruh kedisiplinan beribadah shalat fardhu terhadap prestasi belajar Pendidikan Agama Islam (PAI) siswa

Strategi WO, diantaranya dengan pembenahan manajemen agar lebih profesional, misal dengan menambah karyawan untuk menggantikan bagian keuangan; melakukan pengembangan

jumlah yang paling banyak dibandingkan dengan sumber lain, yaitu protease dari.. tumbuhan dan

The aim of this research was to find out the effectiveness of CSW (catch, speak, and write) game for teaching descriptive writing at SMP Negeri 1 Kutasari in academic year

Metode SQ3R memiliki kelebihan dan kekurangan, hal ini dijelaskan oleh Amir dalam (Nugraheni, 2018:125) yaitu kelebihan metode SQ3R dapat mengarahkan siswa untuk terbiasa

These treatments are important for him to cope with his disease and to gain recognition from other people because psychologically John Nash also needs a friend

Pokja paket pengadaan jasa anggaran 2017 akan me melalui Sistem Pengadaan sebagai berikut:.. Pendaftaran dan penga versi 4.1.1

Sehubungan dengan Pemilihan Penyedia Jasa Konsultansi untuk Paket Pekerjaan Penyusunan Rencana Detail Tata Ruang Kecamatan STM Hilir, maka dengan ini kami mengundang