+ All Categories
Home > Documents > Red Hat Fedora Linux 2 AIO Desk Reference for Dummies

Red Hat Fedora Linux 2 AIO Desk Reference for Dummies

Date post: 08-Dec-2016
Category:
Upload: naba-barkakati
View: 223 times
Download: 1 times
Share this document with a friend
891
www.sharexxx.net - free books & magazines
Transcript
  • www.sharexxx.net - free books & magazines

  • by Naba Barkakati

    Red Hat

    Fedora Linux 2A L L - I N - O N E D E S K R E F E R E N C E

    FOR

    DUMmIES

  • by Naba Barkakati

    Red Hat

    Fedora Linux 2A L L - I N - O N E D E S K R E F E R E N C E

    FOR

    DUMmIES

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummies

    Published byWiley Publishing, Inc.111 River StreetHoboken, NJ 07030-5774

    Copyright 2004 by Wiley Publishing, Inc., Indianapolis, Indiana

    Published by Wiley Publishing, Inc., Indianapolis, Indiana

    Published simultaneously in Canada

    No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form orby any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit-ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior writtenpermission of the Publisher, or authorization through payment of the appropriate per-copy fee to theCopyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, e-mail: [email protected].

    Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for theRest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, and related tradedress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in theUnited States and other countries, and may not be used without written permission. Red Hat and Fedoraare trademarks or registered trademarks of Red Hat, Inc. Linux is a registered trademark of LinusTorvalds. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is notassociated with any product or vendor mentioned in this book.

    LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONSOR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK ANDSPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR APARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERI-ALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THISWORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL,ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICESOF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHORSHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE ISREFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOESNOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION ORWEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THATINTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORKWAS WRITTEN AND WHEN IT IS READ.

    For general information on our other products and services or to obtain technical support, please con-tact our Customer Care Department within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993, orfax 317-572-4002.

    Wiley also publishes its books in a variety of electronic formats. Some content that appears in print maynot be available in electronic books.

    Library of Congress Control Number is available from the publisher.

    ISBN: 0-7645-6793-4

    Manufactured in the United States of America

    10 9 8 7 6 5 4 3 2 1

    1O/SR/QX/QU/IN

  • About the AuthorNaba Barkakati is an electrical engineer and a successful computer-bookauthor who has experience in a wide variety of systems, ranging from MS-DOSand Windows to UNIX and Linux. He bought his first personal computer anIBM PC-AT in 1984 after graduating with a PhD in electrical engineering fromthe University of Maryland at College Park. While pursuing a full-time career inengineering, Naba dreamed of writing software for the emerging PC softwaremarket. As luck would have it, instead of building a software empire likeMicrosoft, he ended up writing successful computer books. Currently, Naba isa Senior Level Technologist at the Center for Technology and Engineering inthe U.S. General Accounting Office.

    Over the past 15 years, Naba has written over 25 computer books on a numberof topics ranging from Windows programming with C++ to Linux. He hasauthored several bestselling titles, such as The Waite Groups Turbo C++ Bible,Object-Oriented Programming in C++, X Window System Programming, Visual C++ Developers Guide, Borland C++ 4 Developers Guide, and Linux Secrets. Hisbooks have been translated into many languages, including Spanish, French,Polish, Greek, Italian, Chinese, Japanese, and Korean. Nabas most recent bookis Red Hat Linux 9 Professional Secrets, also published by Wiley.

    Naba lives in North Potomac, Maryland, with his wife Leha, and their chil-dren, Ivy, Emily, and Ashley.

  • DedicationI would like to dedicate this book to my wife Leha, and daughters Ivy, Emily,and Ashley.

    Authors AcknowledgmentsI am grateful to Terri Varveris for getting me started on this book a set ofnine quick reference guides on all aspects of Red Hat Linux. As the projecteditor, Linda Morris guided me through the manuscript-submission processand kept everything moving. I appreciate the guidance and support that Terriand Linda gave me during this project.

    I would like to thank Jason Luster for reviewing the manuscript for technicalaccuracy and providing many useful suggestions for improving the bookscontent.

    Thanks to everyone at Wiley Publishing for transforming my raw manuscriptinto this well-edited and beautifully packaged book.

    Of course, there would be no reason for this book if it were not for Linux. Forthis, we have Linus Torvalds and the legions of Linux developers around theworld to thank. Thanks to Red Hat for providing beta copies of Red Hat Linuxand the publishers edition CDs that are bundled with this book.

    Finally, and as always, my greatest thanks go to my wife, Leha, and ourdaughters, Ivy, Emily, and Ashley it is their love and support that keeps megoing. Thanks for being there!

  • Publishers AcknowledgmentsWere proud of this book; please send us your comments through our online registration formlocated at www.dummies.com/register/.

    Some of the people who helped bring this book to market include the following:

    Acquisitions, Editorial, and Media Development

    Project Editor: Linda Morris

    Acquisitions Editor: Terri Varveris

    Copy Editor: Rebecca Senninger

    Technical Editor: Jason Luster

    Editorial Manager: Leah Cameron

    Permissions Editor: Laura Moss

    Media Development Specialist: Travis Silvers

    Media Development Manager:Laura VanWinkle

    Media Development Supervisor:Richard Graves

    Editorial Assistant: Amanda Foxworth

    Cartoons: Rich Tennant, www.the5thwave.com

    Composition

    Project Coordinator: Courtney MacIntyre

    Layout and Graphics: Amanda Carter,Andrea Dahl, Lauren Goddard, Denny Hager, Joyce Haughey, Stephanie D. Jumper, Michael Kruzil,Jacque Schneider

    Proofreaders: Carl William Pierce, Sossity Smith, Brian H. Walls

    Indexer: Lynnzee Elze

    Publishing and Editorial for Technology Dummies

    Richard Swadley, Vice President and Executive Group Publisher

    Andy Cummings, Vice President and Publisher

    Mary C. Corder, Editorial Director

    Publishing for Consumer Dummies

    Diane Graves Steele, Vice President and Publisher

    Joyce Pepple, Acquisitions Director

    Composition Services

    Gerry Fahey, Vice President of Production Services

    Debbie Stailey, Director of Composition Services

  • Contents at a GlanceIntroduction ................................................................1

    Book I: Fedora Basics ...................................................7Chapter 1: Introducing Fedora Core ...............................................................................9Chapter 2: Installing Fedora Core ..................................................................................31Chapter 3: Troubleshooting and Configuring Fedora Core ........................................57Chapter 4: Trying Out Fedora Core ...............................................................................75Chapter 5: Cool Fedora Core Install Projects ...............................................................99

    Book II: Workstations and Applications .....................109Chapter 1: Exploring the GUI Desktops ......................................................................111Chapter 2: Learning the Shell .......................................................................................135Chapter 3: Navigating the Linux File System .............................................................153Chapter 4: Exploring Fedora Core Applications ........................................................169Chapter 5: Using Text Editors ......................................................................................199

    Book III: OpenOffice.org ..........................................211Chapter 1: Writing with OpenOffice.org Writer .........................................................213Chapter 2: Preparing Spreadsheets with OpenOffice.org Calc ................................237Chapter 3: Making Presentations with OpenOffice.org Impress .............................249Chapter 4: Drawing with OpenOffice.org Draw .........................................................261

    Book IV: Networking ................................................269Chapter 1: Connecting to the Internet ........................................................................271Chapter 2: Setting Up a Local Area Network ..............................................................295Chapter 3: Adding a Wireless Ethernet LAN ..............................................................307Chapter 4: Managing the Network ...............................................................................319Chapter 5: Cool Networking Projects ..........................................................................329

    Book V: Internet ......................................................335Chapter 1: Exchanging E-Mail and Instant Messages ................................................337Chapter 2: Using the Web .............................................................................................351Chapter 3: Reading Newsgroups .................................................................................371Chapter 4: Transferring Files with FTP .......................................................................383

  • Book VI: Administration ...........................................391Chapter 1: Performing Basic System Administration ...............................................393Chapter 2: Managing Users ..........................................................................................425Chapter 3: Managing the File System ..........................................................................437Chapter 4: Managing Applications ..............................................................................461Chapter 5: Managing Devices and Printers ................................................................479Chapter 6: Upgrading and Customizing the Kernel ...................................................493

    Book VII: Security ...................................................519Chapter 1: Understanding Network and Host Security ............................................521Chapter 2: Securing the Host .......................................................................................535Chapter 3: Securing the Network ................................................................................557Chapter 4: Performing Security Audits .......................................................................577

    Book VIII: Internet Servers .......................................595Chapter 1: Managing the Servers ................................................................................597Chapter 2: Running the Apache Web Server ..............................................................615Chapter 3: Setting Up the FTP Server .........................................................................639Chapter 4: Serving Up Mail and News .........................................................................647Chapter 5: Setting Up DNS ............................................................................................675Chapter 6: Running Samba and NFS ............................................................................695

    Book IX: Programming .............................................707Chapter 1: Fedora Core Programming Essentials ......................................................709Chapter 2: Programming in C .......................................................................................735Chapter 3: Writing Shell Scripts ...................................................................................767Chapter 4: Programming in Perl ..................................................................................779

    Appendix: About the DVD .........................................807

    Index .......................................................................811

  • Table of ContentsIntroduction .................................................................1

    About This Book ..............................................................................................1Conventions Used in This Book ....................................................................2What You Dont Have to Read .......................................................................2Who Are You? ..................................................................................................3How This Book Is Organized ..........................................................................3Whats on the DVD? ........................................................................................4Icons Used in This Book .................................................................................5Where to Go from Here ...................................................................................5

    Book I: Fedora Basics ....................................................7

    Chapter 1: Introducing Fedora Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9What Is Fedora Core? ......................................................................................9

    Operating systems and Linux ..............................................................9Linux distributions ..............................................................................11Transitioning to the Fedora Project ..................................................11Making sense of version numbers .....................................................12Under the hood in Linux kernel 2.6 ...................................................13

    What Fedora Core Includes ..........................................................................16GNU software .......................................................................................16GUIs and applications .........................................................................19Networks ..............................................................................................20Internet servers ...................................................................................21Software development ........................................................................22Online documentation ........................................................................23

    What Fedora Core Helps You Manage ........................................................25Disks, CD-ROMs, and DVD-ROMs ......................................................25Peripheral devices ...............................................................................26File systems and sharing ....................................................................27Network ................................................................................................27

    How Do I Get Started? ...................................................................................28Install .....................................................................................................28Configure ..............................................................................................28Explore ..................................................................................................29Learn .....................................................................................................29

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesx

    Chapter 2: Installing Fedora Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31Following the Installation Steps ..................................................................31Checking Your PCs Hardware .....................................................................33Setting Aside Space for Fedora Core ..........................................................34

    Defragmenting your hard disk ...........................................................34Resizing your hard disk partition ......................................................36

    Starting the Fedora Core Installation .........................................................39Selecting Keyboard, Mouse, and Installation Type ...................................40Partitioning the Disk for Fedora Core .........................................................43Setting Up Key System Parameters .............................................................47

    Installing the boot loader ...................................................................47Configuring the network .....................................................................48Configuring the firewall and SELinux ................................................50Selecting languages to support .........................................................51Setting the time zone ..........................................................................51Setting the root password ..................................................................52

    Selecting and Installing the Package Groups .............................................53

    Chapter 3: Troubleshooting and Configuring Fedora Core . . . . . . . . .57Using Text Mode Installation .......................................................................58Using the linux noprobe Command ............................................................58Troubleshooting X ........................................................................................59Resolving Other Installation Problems .......................................................61

    The fatal signal 11 error ......................................................................61Using kernel boot commands ............................................................62

    Setting Up Printers ........................................................................................64Turning On Sound .........................................................................................68Adding User Accounts ..................................................................................69Managing DVDs and CD-ROMs ....................................................................71Installing RPM Packages ...............................................................................72

    Chapter 4: Trying Out Fedora Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75Booting Fedora Core .....................................................................................75Exploring GUI Desktops ................................................................................81

    GNOME .................................................................................................81KDE ........................................................................................................88

    Playing with the Shell ...................................................................................94Starting the Bash shell ........................................................................95Understanding shell commands ........................................................95Trying a few Linux commands ...........................................................96

    Shutting Down ...............................................................................................98

    Chapter 5: Cool Fedora Core Install Projects . . . . . . . . . . . . . . . . . . . .99Joining the BitTorrent ...................................................................................99

    Things you need ................................................................................100Steps to follow ...................................................................................100

  • Table of Contents xi

    Burning Fedora Core CDs ...........................................................................103Things you need ................................................................................103Steps to follow ...................................................................................103

    Preparing a Fedora Core DVD ....................................................................104Things you need ................................................................................104Steps to follow ...................................................................................105

    Doing an FTP Install ....................................................................................107Things you need ................................................................................107Steps to follow ...................................................................................107

    Book II: Workstations and Applications .....................109

    Chapter 1: Exploring the GUI Desktops . . . . . . . . . . . . . . . . . . . . . . . .111Learning the Common Features of the GUIs ............................................111

    Desktop pop-up menus .....................................................................112Icon pop-up menus ............................................................................113The panel ............................................................................................114The Main Menu ..................................................................................116

    Exploring GNOME .......................................................................................119Using the Nautilus shell ....................................................................120Configuring GNOME ..........................................................................124

    Exploring KDE ..............................................................................................127Using Konqueror ................................................................................128Configuring KDE ................................................................................132

    Chapter 2: Learning the Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135Opening Terminal Windows and Virtual Consoles .................................135Using the Bash Shell ...................................................................................136

    Learning the syntax of shell commands .........................................136Combining shell commands .............................................................138Controlling command input and output .........................................138Typing less with automatic command completion .......................140Going wild with asterisks and question marks ..............................140Repeating previously typed commands .........................................142

    Learning Linux Commands ........................................................................142Becoming root (superuser) ..............................................................146Managing processes ..........................................................................147Working with date and time .............................................................147Processing files ..................................................................................148

    Writing Shell Scripts ...................................................................................151

    Chapter 3: Navigating the Linux File System . . . . . . . . . . . . . . . . . . . .153Understanding the Linux File System .......................................................153Navigating the File System with Linux Commands .................................157

    Commands for directory navigation ...............................................158Commands for directory listings and permissions .......................159

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxii

    Commands for changing permissions and ownerships ...............162Commands for working with files ....................................................163Commands for working with directories ........................................164Commands for finding files ..............................................................165Commands for mounting and unmounting ....................................166Commands for checking disk-space usage ....................................167

    Chapter 4: Exploring Fedora Core Applications . . . . . . . . . . . . . . . . .169Taking Stock of the Fedora Core Applications ........................................169Office Applications and Tools ...................................................................171

    Calculators .........................................................................................172Commercially available office applications for Linux ...................173aspell spelling checker .....................................................................175

    Databases .....................................................................................................176Adding a database user ....................................................................177Reviewing the steps to build the database ....................................178Designing the database .....................................................................179Creating an empty database ............................................................180Using the PostgreSQL interactive terminal ....................................180Defining a table ..................................................................................181Inserting records into a table ...........................................................182Querying the database .....................................................................182

    Multimedia Applications ............................................................................183Using a digital camera .......................................................................183Playing audio CDs ..............................................................................186Playing sound files ............................................................................187Burning a CD ......................................................................................188

    Graphics and Imaging .................................................................................193The GIMP ............................................................................................194Gnome Ghostview .............................................................................196

    Chapter 5: Using Text Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199Using GUI Text Editors ................................................................................199Text Editing with ed and vi ........................................................................200

    Using ed ..............................................................................................201Using vi ...............................................................................................204

    Book III: OpenOffice.org ...........................................211

    Chapter 1: Writing with OpenOffice.org Writer . . . . . . . . . . . . . . . . .213Getting Documents from Others ...............................................................214Taking Stock of OpenOffice.org Writer .....................................................215

  • Table of Contents xiii

    Getting Started with Writer ........................................................................216Examining the Writer main window ................................................217Setting up Writer ................................................................................218

    Preparing Documents in Writer .................................................................221Editing and reviewing documents ...................................................221Using styles and templates ..............................................................224Performing page layout ....................................................................228Creating and inserting graphics ......................................................231Using fields .........................................................................................233Working with large documents ........................................................235

    Chapter 2: Preparing Spreadsheets with OpenOffice.org Calc . . . .237Taking Stock of OpenOffice.org Calc .........................................................237Getting Started with Calc ...........................................................................238

    Examining the Calc main window ...................................................239Setting up Calc ...................................................................................240

    Using Calc .....................................................................................................241Entering and formatting data ...........................................................241Calculating and charting data ..........................................................244

    Chapter 3: Making Presentations with OpenOffice.org Impress . . .249Taking Stock of OpenOffice.org Impress ..................................................249Getting Started with Impress .....................................................................250Using Impress ..............................................................................................253

    Preparing presentations ...................................................................254Adding graphics and special effects ...............................................257Delivering presentations ..................................................................260

    Chapter 4: Drawing with OpenOffice.org Draw . . . . . . . . . . . . . . . . .261Taking Stock of OpenOffice.org Draw .......................................................261Getting Started with Draw ..........................................................................262Using Draw ...................................................................................................264

    Book IV: Networking ................................................269

    Chapter 1: Connecting to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . .271Understanding the Internet .......................................................................271Deciding How to Connect to the Internet ................................................272Connecting with DSL ...................................................................................274

    How DSL works ..................................................................................274DSL alphabet soup: ADSL, IDSL, SDSL ............................................275Typical DSL setup ..............................................................................276

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxiv

    Connecting with a Cable Modem ..............................................................279How cable modem works .................................................................280Typical cable modem setup .............................................................282

    Setting Up Dial-Up Networking ..................................................................284Connecting the modem ....................................................................286Testing the modem ............................................................................289Setting up and activating a PPP connection ..................................291Configuring CHAP and PAP authentication ....................................293

    Chapter 2: Setting Up a Local Area Network . . . . . . . . . . . . . . . . . . .295Understanding TCP/IP ................................................................................295

    TCP/IP and the Internet ....................................................................297IP addresses .......................................................................................297Internet services and port numbers ...............................................298

    Setting Up an Ethernet LAN .......................................................................299How Ethernet works ..........................................................................300Ethernet cables ..................................................................................301

    Configuring TCP/IP Networking ................................................................302Connecting Your LAN to the Internet .......................................................305

    Chapter 3: Adding a Wireless Ethernet LAN . . . . . . . . . . . . . . . . . . . .307Understanding Wireless Ethernet Networks ...........................................307

    Understanding infrastructure and ad hoc modes .........................308Understanding wired equivalent privacy (WEP) ...........................310

    Setting Up the Wireless Hardware ............................................................310Configuring the wireless access point ............................................312

    Configuring Wireless Networking ..............................................................312

    Chapter 4: Managing the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . .319Learning the TCP/IP Configuration Files ..................................................319

    /etc/hosts ...........................................................................................320/etc/networks .....................................................................................320/etc/host.conf .....................................................................................320/etc/resolv.conf ..................................................................................321/etc/hosts.allow .................................................................................321/etc/hosts.deny ..................................................................................322/etc/nsswitch.conf .............................................................................323

    Checking Out TCP/IP Networks .................................................................323Checking the network interfaces .....................................................323Checking the IP routing table ...........................................................324Checking connectivity to a host ......................................................325Checking network status ..................................................................325Sniffing network packets ..................................................................327

    Configuring Networks at Boot Time .........................................................328

  • Table of Contents xv

    Chapter 5: Cool Networking Projects . . . . . . . . . . . . . . . . . . . . . . . . . .329Building Your Own Home Network ...........................................................329

    Things you need ................................................................................329Steps to follow ...................................................................................330

    Adding Wireless to Your Current Network ...............................................331Things you need ................................................................................331Steps to follow ...................................................................................331

    Turning Your Fedora Core System into a NAT Router ............................332Things you need ................................................................................332Steps to follow ...................................................................................333

    Book V: Internet .......................................................335

    Chapter 1: Exchanging E-Mail and Instant Messages . . . . . . . . . . . .337Understanding Electronic Mail ..................................................................338

    How MUA and MTA work ..................................................................338Mail message enhancements ...........................................................339

    Taking Stock of Mail Readers and IM Clients in Fedora Core ................340Using Ximian Evolution ..............................................................................340Using Mozilla Mail .......................................................................................344

    Managing your Inbox ........................................................................347Composing and sending messages .................................................348

    Instant Messaging with Gaim .....................................................................349

    Chapter 2: Using the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351Discovering the World Wide Web ..............................................................351

    Like a giant spiders web ..................................................................352Links and URLs ..................................................................................353Web servers and Web browsers ......................................................355

    Web Browsing in Fedora Core ...................................................................356Checking out the Web browsers in Fedora Core ...........................357Starting Mozilla ..................................................................................357Learning Mozillas user interface ....................................................357Changing your home page ................................................................361Changing Mozillas appearance .......................................................361Surfing the Net with Mozilla .............................................................363

    Creating Web Pages .....................................................................................364Introducing HTML .............................................................................364Composing Web pages with Mozilla Composer ............................366

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxvi

    Chapter 3: Reading Newsgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371Understanding Newsgroups ......................................................................371

    Newsgroup hierarchy ........................................................................372Top-level newsgroup categories ......................................................373Linux-related newsgroups ................................................................374

    Reading Newsgroups from Your ISP .........................................................375Reading newsgroups with Mozilla Mail ..........................................376Newsgroup subscriptions ................................................................378Posting news ......................................................................................379

    Reading and Searching Newsgroups at Web Sites ..................................380

    Chapter 4: Transferring Files with FTP . . . . . . . . . . . . . . . . . . . . . . . . .383Using Graphical FTP Clients ......................................................................383

    Using gFTP ..........................................................................................384Using a Web browser as an FTP client ............................................385

    Using the Command-Line FTP Client ........................................................387

    Book VI: Administration ............................................391

    Chapter 1: Performing Basic System Administration . . . . . . . . . . . .393Taking Stock of System-Administration Tasks .........................................393How to Become root ...................................................................................395

    Using the su - command ...................................................................395Becoming root for the GUI Utilities ...........................................................395

    Recovering from a forgotten root password ..................................396Understanding How Fedora Core Boots ...................................................397

    Understanding the init process .......................................................397Examining the /etc/inittab file .........................................................399Trying a new run level with the init command ..............................400Understanding the Fedora Core startup scripts ...........................401Manually starting and stopping servers ........................................402Automatically starting servers at system startup ........................403Understanding the GUI startup .......................................................404

    Taking Stock of Fedora Core System Configuration Files ......................406Monitoring System Performance ..............................................................408

    Using the top utility ..........................................................................409Using the GNOME system monitor .................................................411Using the uptime command .............................................................412Using the vmstat utility ....................................................................413Checking disk performance and disk usage ...................................414

    Viewing System Information via the /proc File System ..........................415Scheduling Jobs in Fedora Core ................................................................418

    Scheduling one-time jobs .................................................................419Scheduling recurring jobs ................................................................421

  • Table of Contents xvii

    Chapter 2: Managing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425Adding User Accounts ................................................................................425

    Using the User Manager to add user accounts ..............................426Using commands to manage user accounts ..................................428

    Understanding the /etc/passwd File .........................................................429Managing Groups ........................................................................................430Exploring the User Environment ...............................................................431Changing User and Group Ownership of Files .........................................434

    Chapter 3: Managing the File System . . . . . . . . . . . . . . . . . . . . . . . . . .437Learning the Linux File System .................................................................437

    Understanding the file-system hierarchy .......................................438Mounting a device on the file system .............................................440Examining the /etc/fstab file ............................................................442

    Sharing Files with NFS ................................................................................443Exporting a file system with NFS .....................................................444Mounting an NFS file system ............................................................445

    Backing Up and Restoring Files .................................................................445Selecting a backup strategy and media ..........................................445Commercial backup utilities for Linux ...........................................447Using the tape archiver tar ..........................................................447

    Accessing DOS/Windows File Systems .....................................................452Mounting a DOS disk partition ........................................................452Mounting DOS floppy disks ..............................................................453Mounting an NTFS Partition .............................................................455

    Using mtools ................................................................................................455Trying mtools .....................................................................................456Understanding the /etc/mtools.conf file ........................................456Learning the mtools commands ......................................................457Formatting a DOS floppy ..................................................................459

    Chapter 4: Managing Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . .461Working with Red Hat Package Manager .................................................461

    Using the RPM commands ...............................................................461Understanding RPM filenames .........................................................462Finding out about RPMs ...................................................................463Installing an RPM ...............................................................................466Removing an RPM .............................................................................467Upgrading an RPM .............................................................................467Verifying an RPM ...............................................................................468

    Building Software Packages from Source Files ........................................469Downloading and unpacking the software .....................................469Building the software from source files ..........................................471Installing SRPMS ................................................................................474

    Updating Fedora Core Applications with Up2date .................................474Using Yellow dog Updater, Modified (Yum) .............................................475

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxviii

    Chapter 5: Managing Devices and Printers . . . . . . . . . . . . . . . . . . . . .479Understanding Linux Devices ...................................................................479

    Device files .........................................................................................480Persistent device naming with udev ..............................................482

    Managing Loadable Driver Modules .........................................................482Loading and unloading modules .....................................................483Using the /etc/modprobe.conf file ..................................................485

    Managing USB Devices ...............................................................................486Managing Print Queues in Fedora Core ....................................................488

    Spooling and print jobs ....................................................................488Printing with the lp command .........................................................490Checking the print queue using lpq ................................................490Canceling the print job using cancel ..............................................490Checking the printer status using lpstat ........................................491Controlling the print queue ..............................................................491

    Chapter 6: Upgrading and Customizing the Kernel . . . . . . . . . . . . . . .493Upgrading with a Kernel RPM ....................................................................494

    Downloading new kernel RPMs .......................................................494Installing the kernel RPMs ................................................................494Trying out the new kernel ................................................................495

    Rebuilding the Kernel .................................................................................496Creating a monolithic versus a modular kernel ............................497Configuring the kernel ......................................................................498Running the kernel configuration tool ............................................499

    Building the Kernel and the Modules .......................................................513Installing the Modules ................................................................................514Creating the Initial RAM Disk File ..............................................................514Installing the New Kernel and Setting Up GRUB .....................................515Rebooting the System .................................................................................517

    Book VII: Security ....................................................519

    Chapter 1: Understanding Network and Host Security . . . . . . . . . . .521Why Worry About Security? ......................................................................521Establishing a Security Framework ..........................................................522

    Determine business requirements for security .............................523Perform risk analysis ........................................................................524Establish security policy ..................................................................525Implement security solutions (mitigation) ....................................526Manage security ................................................................................526

  • Table of Contents xix

    Securing Linux .............................................................................................527Understanding the host security issues .........................................527Understanding network security issues .........................................528

    Learning Computer Security Terminology ...............................................529Keeping Up with Security News and Updates .........................................532

    Chapter 2: Securing the Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535Installing Operating System Updates .......................................................535Securing Passwords ....................................................................................536

    Shadow passwords ............................................................................536Pluggable authentication modules (PAMs) ....................................537

    Protecting Files and Directories ................................................................540Viewing ownerships and permissions ............................................540Changing file ownerships .................................................................541Changing file permissions ................................................................541Setting default permission ...............................................................542Checking for set user ID permission ...............................................543

    Using exec-shield .........................................................................................544Using SELinux ..............................................................................................545Encrypting and Signing Files with GnuPG ................................................547

    Understanding public-key encryption ............................................547Understanding digital signatures ....................................................548Using GPG ...........................................................................................550

    Monitoring System Security .......................................................................554

    Chapter 3: Securing the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557Securing Internet Services .........................................................................557

    Using chkconfig to disable standalone services ...........................558Configuring the xinetd server to disable services ........................558

    Using Secure Shell (SSH) for Remote Logins ...........................................561Setting Up Simple Firewalls ........................................................................563

    Screening the router with packet filtering .....................................565Dual-homed host ...............................................................................567Perimeter network with bastion host .............................................568Application gateway ..........................................................................570

    Enabling Packet Filtering on Your Fedora Core System .........................571Using the security level configuration tool ....................................572Using the iptables command ...........................................................573

    Chapter 4: Performing Security Audits . . . . . . . . . . . . . . . . . . . . . . . . .577Understanding Security Audits .................................................................577

    Nontechnical aspects of security audits ........................................578Technical aspects of security audits ..............................................579

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxx

    Learning a Security Test Methodology .....................................................579Some common computer vulnerabilities .......................................580Host security review .........................................................................582Network-security review ...................................................................585

    Exploring Security Testing Tools ..............................................................588Nmap ...................................................................................................589Nessus .................................................................................................590SAINT ..................................................................................................593SARA ....................................................................................................594

    Book VIII: Internet Servers ........................................595

    Chapter 1: Managing the Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .597Understanding Internet Services ..............................................................597

    TCP/IP and sockets ...........................................................................598Internet services and port numbers ...............................................601

    Using the xinetd Super Server ...................................................................603Running Standalone Servers ......................................................................606

    Starting and stopping servers manually ........................................606Starting servers automatically at boot time ..................................607

    Chapter 2: Running the Apache Web Server . . . . . . . . . . . . . . . . . . . .615Exploring HTTP ...........................................................................................615Exploring the Apache Web Server ............................................................618

    Installing the Apache Web server ...................................................619Starting the Apache Web server ......................................................620

    Configuring the Apache Web Server .........................................................621Using Apache configuration tools ...................................................622Apache configuration files ...............................................................623The httpd.conf configuration file ....................................................624Virtual host setup ..............................................................................634

    Chapter 3: Setting Up the FTP Server . . . . . . . . . . . . . . . . . . . . . . . . . .639Installing the FTP Server ............................................................................639Configuring the FTP Server ........................................................................640

    vsftpd configuration files .................................................................640/etc/vsftpd/vsftpd.conf file ...............................................................641/etc/vsftpd.ftpusers file ....................................................................643/etc/vsftpd.user_list file ....................................................................644

    Setting Up Secure Anonymous FTP ..........................................................644Trying Anonymous FTP ..............................................................................645

    Key features of anonymous FTP ......................................................645

  • Table of Contents xxi

    Chapter 4: Serving Up Mail and News . . . . . . . . . . . . . . . . . . . . . . . . .647Installing the Mail Server ...........................................................................647

    Using sendmail ...................................................................................648A mail-delivery test ...........................................................................649The mail-delivery mechanism ..........................................................649The sendmail configuration file .......................................................651sendmail.cf file syntax ......................................................................659Other sendmail files ..........................................................................661The .forward file ................................................................................662Invoking procmail in the .forward file .............................................663The sendmail alias file ......................................................................664

    Installing the News Server .........................................................................665Configuring and Starting the INN Server ..................................................665

    InterNetNews components ...............................................................666The incoming.conf file ......................................................................670The readers.conf file .........................................................................671InterNetNews startup .......................................................................671

    Setting Up Local Newsgroups ....................................................................672Defining a newsgroup hierarchy ......................................................673Updating configuration files .............................................................673Adding the newsgroups ....................................................................674Testing your newsgroups .................................................................674

    Chapter 5: Setting Up DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .675Understanding Domain Name System (DNS) ...........................................675

    What is DNS? ......................................................................................676Learning hierarchical domain names .............................................677Exploring Berkeley Internet Name Domain (BIND) .......................678

    Configuring DNS ..........................................................................................682Configuring the resolver ...................................................................682Configuring a caching name server ................................................683Configuring a primary name server ................................................692

    Chapter 6: Running Samba and NFS . . . . . . . . . . . . . . . . . . . . . . . . . . .695Sharing Files with NFS ................................................................................695

    Exporting a file system with NFS .....................................................696Mounting an NFS file system ............................................................698Using the NFS Server Configuration tool ........................................699

    Setting Up a Windows Server Using Samba .............................................700Checking whether Samba is installed .............................................702Configuring Samba ............................................................................703Trying out Samba ..............................................................................705

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxxii

    Book IX: Programming ..............................................707

    Chapter 1: Fedora Core Programming Essentials . . . . . . . . . . . . . . . .709Learning Programming ...............................................................................709

    A simplified view of a computer ......................................................710Role of the operating system ...........................................................711Basics of computer programming ...................................................712

    Exploring the Software Development Tools in Fedora Core ..................713GNU C and C++ compilers ................................................................714The GNU make utility ........................................................................718The GNU debugger ............................................................................725

    Understanding the Implications of GNU Licenses ..................................732The GNU General Public License .....................................................732The GNU Library General Public License .......................................733

    Chapter 2: Programming in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .735The Structure of a C Program ....................................................................735Preprocessor Directives .............................................................................737

    Including files .....................................................................................738Defining macros .................................................................................738

    Declaration and Definition of Variables ....................................................741Basic data types ................................................................................741Enumerations .....................................................................................742

    Structures, Unions, and Bit Fields .............................................................743Arrays ..................................................................................................743Pointers ...............................................................................................744Type definitions .................................................................................745Type qualifiers: const and volatile ..................................................746

    Expressions ..................................................................................................747Operator Precedence ..................................................................................749Statements ...................................................................................................751

    The break statement .........................................................................751The case statement ...........................................................................752A compound statement or block .....................................................752The continue statement ...................................................................752The default label ................................................................................753The do statement ..............................................................................753Expression statements ......................................................................753The for statement ..............................................................................753The goto statement ...........................................................................754The if statement .................................................................................754The if-else statement .........................................................................754The null statement ............................................................................755The return statement ........................................................................755

  • Table of Contents xxiii

    The switch statement .......................................................................755The while statement .........................................................................756

    Functions ......................................................................................................757Function prototypes ..........................................................................757The void type .....................................................................................758Functions with a variable number of arguments ...........................758

    The C Library ...............................................................................................758Shared Libraries in Linux Applications ....................................................760

    Examining shared libraries that a program uses ..........................760Creating a shared library ..................................................................762Dynamically loading a shared library .............................................764

    Chapter 3: Writing Shell Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .767Trying Out Simple Shell Scripts ................................................................767Learning the Basics of Shell Scripting ......................................................770

    Storing stuff ........................................................................................770Calling shell functions .......................................................................771Controlling the flow ...........................................................................772Exploring Bashs built-in commands ..............................................775

    Chapter 4: Programming in Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .779Understanding Perl .....................................................................................779Determining Whether You Have Perl ........................................................780Writing Your First Perl Script .....................................................................782Getting an Overview of Perl .......................................................................783

    Basic Perl syntax ...............................................................................783Variables .............................................................................................784Operators and expressions ..............................................................787Regular expressions ..........................................................................789Flow-control statements ...................................................................791Accessing Linux commands .............................................................795File access ..........................................................................................797Filename with pipe prefix .................................................................798Subroutines ........................................................................................799Built-in functions in Perl ...................................................................800

    Understanding Perl Packages and Modules ............................................800Perl packages .....................................................................................801Perl modules ......................................................................................802Using a module ..................................................................................803

    Using Objects in Perl ..................................................................................804Understanding Perl Objects .......................................................................804

    Creating and accessing Perl objects ...............................................805Using the English module .................................................................806

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummiesxxiv

    Appendix: About the DVD ..........................................807DVD Installation Instructions ....................................................................807What You Can Find on the DVD .................................................................809Troubleshooting ..........................................................................................810

    Index........................................................................811

  • Introduction

    Red Hat has recently decided to discontinue the Red Hat Linux productline and instead focus on the commercial Red Hat Enterprise Linux RHEL product line. The evolution of the now-defunct Red Hat Linuxproduct line continues on as the Fedora Project, a Red Hat-sponsored andcommunity-supported open source project that continues to evolve whatonce was Red Hat Linux. What comes out of the Fedora Project is a FedoraCore release every six months or so. (For example, Fedora Core 1 came outin November 2003 and Fedora Core 2 was released in May 2004.) In contrastto the rapid Fedora Core release cycles, RHEL is a stable product line witha 12 to 18 month release cycle and five years of support for every version.New technologies that first appear in Fedora Core will eventually find theirway into the next-generation Red Hat Enterprise Linux (RHEL) product.Thus, Fedora Core releases are a precursor to whats coming in RHEL inthe future.

    The recently released Fedora Core 2 comes with many new system compo-nents including the Linux 2.6.5 kernel, X.Org X11 6.7.0, GNOME 2.6, KDE 3.2.2,GCC 3.3 compiler, and the glibc 2.3.3 system libraries. This version supportsmany new features such as Advanced Configuration and Power Interface(ACPI), Bluetooth wireless connections, and a graphical boot screen thatshows system startup messages in a user-friendly screen.

    Fedora Core 2 also includes the OpenOffice.org 1.1.1 office suite. To top itoff, Fedora Core continues to come with a graphical installation programthat makes installation easy!

    About This BookRed Hat Fedora Linux 2 All-in-One Desk Reference For Dummies gives younine different quick-reference guides in a single book. Taken together, thesenine books provide detailed information on installing, configuring, andusing Fedora Core.

    What youll like most about this book is that you dont have to read itsequentially chapter by chapter, or, for that matter, even the sections ina chapter. You can pretty much turn to the topic you want and quickly getthe answer to your pressing questions about Fedora Core, be it about usingthe OpenOffice.org word processor or setting up the Apache Web server.

  • Conventions Used in This Book2

    Here are some of the things you can do with this book:

    Install and configure Fedora Core from the DVD-ROM included with thebook.

    Connect the Fedora Core PC to the Internet through a DSL or cablemodem.

    Set up dial-up networking with PPP.

    Get tips, techniques, and shortcuts for specific uses of Fedora Core,such as

    Setting up and using Internet services such as Web, Mail, News, FTP,NFS, and DNS.

    Setting up a Windows server using Samba.

    Using Linux commands.

    Using Perl, shell, and C programming on Linux.

    Using the OpenOffice.org office suite and other applications thatcome with Fedora Core.

    Understand the basics of system and network security.

    Perform system administration tasks.

    Conventions Used in This BookI use a simple notational style in this book. All listings, filenames, functionnames, variable names, and keywords are typeset in a monospace font forease of reading. I italicize the first occurrences of new terms and conceptsand then provide a definition right there. The output of commands followsthe typed command and the output is shown in a monospace font.

    What You Dont Have to ReadEach mini reference book zeros in on a specific task area such as using theInternet or running Internet servers and then provides hands-on instructionson how to perform a series of related tasks. You can jump right to a sectionand read about a specific task. You dont have to read anything but the fewparagraphs or the list of steps that relate to your question. Use the Table ofContents or the Index to locate the pages relevant to your question.

    You can safely ignore text next to the Technical Stuff icons as well as thesidebars.

  • How This Book Is Organized 3

    Who Are You?I assume that you are somewhat familiar with a PC you know how to turnit on and off and you have dabbled a bit with Windows. Considering thatmost new PCs come preloaded with Windows, this assumption is safe, right?

    When installing Fedora Core on your PC, you may want to retain yourWindows 2000 or Windows XP installations intact. I assume you dontmind investing in a good disk-partitioning tool such as PowerQuestsPartitionMagic, available at www.powerquest.com/partitionmagic(no, I dont have any connections with PowerQuest).

    I also assume that you are willing to accept the risk that when you try toinstall Fedora Core, some things may not quite work. Problems can happenif you have some uncommon types of hardware. If you are afraid of ruiningyour system, try finding a slightly older spare Pentium PC that you can sac-rifice and then install Fedora Core on that PC.

    How This Book Is OrganizedRed Hat Fedora Linux 2 All-in-One Desk Reference For Dummies has nine books,each of which focuses on a small set of related topics. If you are looking forinformation on a specific topic, check the book names on the spine or con-sult the Table of Contents.

    This desk reference starts with a minibook that explains the basics of FedoraCore and guides you through the installation process (a unique aspect ofthis book because you typically do not purchase a PC with Fedora Core pre-installed). The second minibook serves as a users guide to Fedora Core itfocuses on exploring various aspects of a Fedora Core workstation, includingthe GNOME and KDE GUIs and many of the applications that come bundledwith Fedora Core. The third minibook is a users guide to the OpenOffice.orgoffice applications. The fourth minibook covers networking and Book V goesinto using the Internet. Book VI introduces system administration. The sev-enth minibook turns to the important subject of securing a Fedora Coresystem and its associated network. Book VIII shows you how to run a vari-ety of Internet servers from mail to a Web server. The ninth and final mini-book introduces you to programming.

    Heres a quick overview of the nine books and what they contain:

    Book I: Fedora Basics: What is Fedora Core? Understanding whats new inthe Linux 2.6 kernel. Installing, configuring, and troubleshooting FedoraCore. Taking Fedora Core for a test drive.

  • Whats on the DVD?4

    Book II: Workstations and Applications: Exploring GNOME and KDE. Usingthe shell (whats a shell anyway?). Navigating the Fedora Core file system.Exploring the applications such as multimedia software as well as the texteditors (vi and ed).

    Book III: OpenOffice.org: Writing with OpenOffice.org Writer. Preparingspreadsheets with OpenOffice.org Calc. Making presentations withOpenOffice.org Impress. Preparing drawings with OpenOffice.org Draw.

    Book IV: Networking: Connecting the Fedora Core PC to the Internet througha dial-up connection or a high-speed always-on connection such as DSL orcable modem. Configuring and managing TCP/IP networks, including wire-less networks.

    Book V: Internet: Using various Internet services such as e-mail, Web surf-ing, and reading newsgroups. Transferring files with FTP.

    Book VI: Administration: Performing basic system administration. Managinguser accounts and the file system. Installing applications. Working withdevices and printers. Using USB devices. Upgrading and customizing theLinux kernel.

    Book VII: Security: Understanding network and host security. Securing thehost and the network. Performing security audits.

    Book VIII: Internet Servers: Managing the Internet services. Configuring theApache Web server. Setting up the FTP server (including anonymous FTP).Configuring the mail and news servers. Providing DNS. File sharing with NFS.Using Samba to set up a Windows server.

    Book IX: Programming: Finding out the basics of programming. Exploring thesoftware development tools in Fedora Core. Writing shell scripts. Learning Cand Perl programming.

    Appendix: About the DVD: Summarizes the contents of the books compan-ion DVD-ROM.

    Whats on the DVD?The DVD contains Fedora Core 2 from the Fedora Project (fedora.redhat.com). You may use the DVD in accordance with the license agreementsaccompanying the software. To discover more about the contents of the DVD,please consult the appendix.

  • Where to Go from Here 5

    Icons Used in This BookFollowing the time-honored tradition of the All-in-One Desk Reference ForDummies series, I use icons to help you quickly pinpoint useful information.The icons include the following:

    The Remember icon marks a general interesting fact something that Ithought you want to know and remember.

    The Tip icon marks things that you can do to make your job easier.

    The Warning icon highlights potential pitfalls. With this icon, Im telling you:Watch out! This could hurt your system!

    The Technical Stuff icon marks technical information that could be of inter-est to an advanced user (or those of us aspiring to be advanced users).

    Where to Go from HereIts time to get started on your Fedora Core adventure. Take out the DVDand install Fedora Core. Then, turn to a relevant chapter and let the funbegin. Use the Table of Contents and the Index to figure out where you wantto go. Before you know it, youll become an expert at Fedora Core!

    If you want to participate in the Fedora Core project, visit the projects Website at fedora.redhat.com for more information.

    I hope you enjoy consulting this book as much as I enjoyed writing it!

    SidebarsI use sidebars throughout the book to highlightinteresting, but not critical, information. Sidebarsexplain concepts you may not have encountered

    before or give a little insight into a related topic.If youre in a hurry, you can safely skip thesidebars.

  • Red Hat Fedora Linux 2 All-in-One Desk Reference For Dummies6

  • Book I

    Fedora Basics

  • Contents at a GlanceChapter 1: Introducing Fedora Core ....................................................................................9

    Chapter 2: Installing Fedora ................................................................................................31

    Chapter 3: Troubleshooting and Configuring Fedora Core ..............................................57

    Chapter 4: Trying Out Fedora Core ....................................................................................75

    Chapter 5: Cool Fedora Install Projects ..............................................................................99

  • Chapter 1: Introducing Fedora Core

    In This Chapter Explaining what Fedora Core is

    Going over what Fedora Core includes

    Discovering what Fedora Core helps you manage

    Getting started

    I bet youve heard about Linux and you probably know about Red HatLinux as well, but chances are Fedora Core is new to you. If youre won-dering what exactly Fedora Core is and what it can help you do, this chapteris all about answering those questions. Here I provide a broad-brushstrokepicture of Fedora Core and tell you how you can start using it right away.

    By the way, this book covers Fedora Core for Intel 80x86 and Pentiumprocessors (basically any PC that can run any flavor of Windows).

    What Is Fedora Core?Fedora Core is what used to be Red Hat Linux the Linux distribution fromRed Hat that used to be available free of charge. If you never knew Red HatLinux, think of Fedora Core as another Linux distribution. That leaves youwith the question: What is a Linux distribution anyway?

    Trying to describe a Linux distribution is a bit like that story of six blindmen trying to describe an elephant. You know the one one blind mantouches the elephants side and says the elephant is like a wall, anotherchecks out the tusk and concludes that an elephant is like a spear, and soon. Along those lines, a Linux distribution appears to be many differentthings, depending on what you experience. You can think of it as the graph-ical user interface or just a PC to run your e-mail program, but, at its heart,its an operating system. The following sections explain what I mean by thisstatement.

    Operating systems and LinuxYou know that your PC is a bunch of hardware things you can touch, likethe system box, monitor, keyboard, and mouse. The system box containsthe most important hardware of all the central processing unit (CPU), themicrochip that runs the software (any program that tells the computer how

  • What Is Fedora Core?10

    to do your bidding) which you actually cant touch. In a typical Pentium 4PC, the Pentium 4 microprocessor is the CPU. Other important hardware inthe system box includes the memory (RAM chips) and the hard drive andone program has to run all this stuff and get it to play nice: the operatingsystem.

    The operating system is software that manages all the hardware and runsother software at your command. You, the user, provide those commandsby clicking menus and icons or by typing some cryptic text. Linux is an oper-ating system as are UNIX, Windows 98, Windows 2000, and Windows XP.The Linux operating system is modeled after UNIX; in its most basic, no-frillsform, it also goes by the name Linux kernel.

    The operating system is what gives a computer any computer its per-sonality. For example, you can run Windows 98 or Windows XP on a PC and on that same PC, you can also install and run Linux. That means, depend-ing on which operating system is installed and running, the same PC can bea Windows 98, Windows XP, or Linux system.

    The primary job of an operating system is to load software (computer pro-grams) from the hard disk (or other permanent storage) into the memoryand get the CPU to run those programs. Everything you do with your com-puter is possible because of the operating system so if the operatingsystem somehow messes up, the whole system freezes up. You know howinfuriating it is when your favorite operating system maybe even the onethat came with your PC suddenly calls it quits just as you are about toclick the Send button after composing that long e-mail to your friend. You trythe three-finger salute (pressing Ctrl+Alt+Del), but nothing happens. Thenits time for the Reset button (provided your computers builders were wiseenough to include one). Luckily, that sort of thing almost never happenswith Linux it has a reputation for being a very reliable operating system.

    Does Linux really run on any computer?Linux runs on many different types of computersystems and it does seem able to run onnearly any type of computer. Linus Torvalds andother programmers originally developed Linuxfor the Intel 80x86 (and compatible) line ofprocessors. Nowadays, Linux is also availablefor systems based on other processors suchas those with AMDs 64-bit AMD64 processors,the Motorola 68000 family; Alpha AXPs; Sun

    SPARCs and UltraSPARCs; Hewlett-PackardsHP PA-RISC; the PowerPC and PowerPC64processors; and the MIPS R4x00 and R5x00.More recently, IBM has released its own ver-sion of Linux for its S/390 mainframe. This bookcovers Linux for Intel 80x86 and Pentium proces-sors (these have in common a basic physicalstructure known as IA-32 architecture).

  • Book IChapter 1

    IntroducingFedora

    CoreWhat Is Fedora Core? 11

    In technical mumbo jumbo, Linux is a multiuser, multitasking operating system.All this means is that Linux enables multiple users to log in, and Linux canrun more than one program at the same time. Nearly all operating systemsare multiuser and multitasking these days, but when Linux first started in1994, multiuser and multitasking were big selling points.

    Linux distributionsFedora Core is a specific Linux distribution essentially a package of fea-tures. Fedora Core consists of the Linux kernel (the operating system) anda collection of applications, together with an easy-to-use GUI installationprogram, called Anaconda.

    You find many Linux distributions, and each includes the standard Linuxoperating system:

    The X.Org X Window System: The graphical user interface.

    One or more graphical desktops: Among the most popular are GNOMEand KDE.

    A selection of applications: Linux programs come in the form of ready-to-run software, but the source code (the commands we humans use to tellthe computer what to do, but you dont need the source code to run theoperating system or any applications) is included, as is its documentation.

    Current Linux distributions include a huge selection of software somuch that it requires multiple CD-ROMs or a single DVD-ROM (whichthis book includes).

    Many Linux distributions are commercial products that you can buy in com-puter stores and bookstores. If you have heard about Open Source and theGNU (GNUs Not UNIX) license, you may assume that no one can sell Linuxfor profit. Luckily for companies that sell Linux distributions, the GNUlicense also called the GNU General Public License (GPL) does allowcommercial, for-profit distribution, but requires that the software be dis-tributed in source-code form, and stipulates that anyone may copy anddistribute the software in source-code form to anyone else. Fedora Coreis available free of charge under the GPL, which means that my publishermay include the Fedora


Recommended