cover

Table of Contents

Cover

Title Page

Copyright

Dedication

About the Author

Credits

Acknowledgments

Introduction

Understanding the Linux Mystique

How This Book Is Organized

What You Will Get from This Book

Conventions Used in This Book

Part I: Getting off the Ground with Linux

Chapter 1: Starting with Linux

Taking Your First Step

Understanding Linux

What’s So Great About Linux?

Summary

Chapter 2: Linux Projects, Activities, and Careers

Making Things with Linux

Getting Involved with Linux

Keeping Up with Linux

Linux in the Real World

Becoming a Linux Professional

Summary

Part II: Running a Linux Desktop

Chapter 3: Getting into the Desktop

Understanding Your Desktop

Starting the Desktop

K Desktop Environment

The GNOME Desktop

Configuring Your Own Desktop

Getting More Information

Summary

Chapter 4: Playing Music and Video

Playing Digital Media and Obeying the Law

Playing Music

Recording and Ripping Music

Working with TV, Video, and Digital Imaging

Watching Movies and Video

Using a Digital Camera

Summary

Chapter 5: Working with Words and Images

Desktop Publishing in Linux

Working with Graphics

Displaying PDF and PostScript Documents

Using Scanners with SANE

Web Publishing

Summary

Chapter 6: E-Mailing and Web Browsing

Using E-Mail

Choosing a Web Browser

Exploring the SeaMonkey Suite

Using Firefox

Using Text-Based Web Browsers

Summary

Chapter 7: Gaming with Linux

Jumping into Linux Gaming

Overview of Linux Gaming

Basic Linux Gaming Information

Choosing Gaming Hardware for Linux

Running Open Source Linux Games

Commercial Linux Games

Summary

Part III: Learning System Administration Skills

Chapter 8: Installing Linux

Choosing a Linux Distribution

Getting Your Own Linux Distribution

Exploring Common Installation Topics

Installing from the Linux Bible CD or DVD

Summary

Chapter 9: Running Commands from the Shell

Starting a Shell

Choosing Your Shell

Exploring the Shell

Using the Shell in Linux

Creating Your Shell Environment

Working with the Linux File System

Using the vi Text Editor

Summary

Chapter 10: Learning Basic Administration

Graphical Administration Tools

Using the root Login

Exploring Administrative Commands, Configuration Files, and Log Files

Using sudo and Other Administrative Logins

Administering Your Linux System

Creating User Accounts

Configuring Hardware

Managing File Systems and Disk Space

Monitoring System Performance

Doing Remote System Administration

Summary

Chapter 11: Getting on the Internet

Connecting to the Network

Using Ethernet Connections to the Internet

Using Dial-Up Connections to the Internet

Connecting to the Internet with Wireless

Summary

Chapter 12: Securing Linux

Linux Security Checklist

Using Linux Securely

Using Log Files

Using Secure Shell Tools

Securing Linux Servers

Using Security Tools from Linux Live CDs

Summary

Part IV: Setting Up Linux Servers

Chapter 13: Running a Linux, Apache, MySQL, and PHP (LAMP) Server

Components of a LAMP Server

Setting Up Your LAMP Server

Operating Your LAMP Server

Troubleshooting

Securing Your Web Traffic with SSL/TLS

Summary

Chapter 14: Running a Mail Server

Internet E-Mail’s Inner Workings

About the System and the Software Used

Preparing Your System

Installing and Configuring the Mail Server Software

Testing and Troubleshooting

Configuring Mail Clients

Securing Communications with SSL/TLS

Summary

Chapter 15: Running a Print Server

Common UNIX Printing Service

Setting Up Printers

Working with CUPS Printing

Using Printing Commands

Configuring Print Servers

Summary

Chapter 16: Running a File Server

Setting Up an NFS File Server

Setting Up a Samba File Server

Summary

Part V: Choosing and Installing Different Linux Distributions

Chapter 17: Running Ubuntu Linux

Overview of Ubuntu

Installing Ubuntu

Getting Started with Ubuntu

Getting More Information about Ubuntu

Summary

Chapter 18: Running Fedora and Red Hat Enterprise Linux

Digging into Features

Going Forward with Fedora

Fedora Comes of Age

Installing Fedora

Summary

Chapter 19: Running Debian GNU/Linux

Inside Debian GNU/Linux

Getting Help with Debian

Installing Debian GNU/Linux

Managing Your Debian System

Summary

Chapter 20: Running SUSE and openSUSE Linux

Understanding SUSE Linux Enterprise and openSUSE

What’s in SUSE Distributions?

Getting Support for SUSE Linux Enterprise and openSUSE

Installing openSUSE

Starting with openSUSE

Summary

Chapter 21: Running KNOPPIX

KNOPPIX Features

Understanding KNOPPIX

Starting KNOPPIX

Using KNOPPIX

Summary

Chapter 22: Running Yellow Dog Linux

Understanding Yellow Dog Linux

Going Forward with Yellow Dog

Digging into Yellow Dog

Installing Yellow Dog Linux

Updating Yellow Dog Linux

Support Options

Summary

Chapter 23: Running Gentoo Linux

Understanding Gentoo

What’s in Gentoo

Installing Gentoo

Summary

Chapter 24: Running Slackware Linux

Getting into Slackware

Characterizing the Slackware Community

Challenges of Using Slackware

Using Slackware as a Development Platform

Installing Slackware

Starting with Slackware

Summary

Chapter 25: Running PCLinuxOS

Starting with PCLinuxOS

Installing PCLinuxOS

Remastering PCLinuxOS

Summary

Chapter 26: Running Mandriva

Mandriva Features

Exploring Mandriva

The Mandriva Community

Installing Mandriva Limited Edition

Summary

Chapter 27: Running a Linux Firewall Router

Understanding Firewalls

Protecting Desktops with Firewalls

Using Firewalls with iptables

Making a Coyote Linux Bootable Floppy Firewall

Using Other Firewall Distributions

Summary

Chapter 28: Running Bootable Linux Distributions

Overview of Bootable Linux Distributions

Trying a Bootable Linux

Special-Purpose Bootables

Customizing a Bootable Linux

Summary

Part VI: Programming in Linux

Chapter 29: Programming Environments and Interfaces

Understanding Programming Environments

Using Linux Programming Environments

Linux Programming Interfaces

Summary

Chapter 30: Programming Tools and Utilities

The Well-Stocked Toolkit

Using the GCC Compiler

Automating Builds with make

Library Utilities

Source Code Control

Debugging with GNU Debugger

Summary

Appendix 1: Media

Finding Linux Distributions on the DVD

Finding Linux Distributions on the CD

Linux Distributions Not on the DVD or CD

Creating Linux CDs

Getting Source Code

Appendix 2: Linux History and Background

Exploring Linux History

Linux Myths, Legends, and FUD

Summary

Index

End-User License Agreement

GNU General Public License

Preamble

Terms and Conditions for Copying, Distribution and Modification

Advertisement

Title Page

As always, I dedicate this book to my wife, Sheree.

About the Author

Chris Negus has written or co-written dozens of books on Linux and UNIX, including Red Hat Linux Bible (all editions), CentOS Bible, Fedora and Red Hat Enterprise Linux Bible, Linux Troubleshooting Bible, Linux Toys and Linux Toys II. Recently, Chris co-authored several books for the new Toolbox series for power users: Fedora Linux Toolbox, SUSE Linux Toolbox, Ubuntu Linux Toolbox, Mac OS X, and BSD UNIX Toolbox.

For eight years Chris worked with the organization at AT&T that developed UNIX before moving to Utah to help contribute to Novell’s UnixWare project in the early 1990s. When not writing about Linux, Chris enjoys playing soccer and just hanging out with his family.

Currently, Chris is employed by Red Hat, Inc. as a Linux instructor. He teaches classes and gives exams to those seeking Red Hat Certified Engineer (RHCE) and Red Hat Certified Technician (RHCT) certifications.

Credits

Executive Editor

Carol Long

Project Editor

Sara Shlaer

Technical Editor

Warren Wyrostek

Production Editor

Kathleen Wisor

Copy Editor

Paula Lowell

Editorial Director

Robyn B. Siesky

Editorial Manager

Mary Beth Wakefield

Marketing Manager

David Mayhew

Production Manager

Tim Tate

Vice President and Executive Group Publisher

Richard Swadley

Vice President and Executive Publisher

Barry Pruett

Associate Publisher

Jim Minatel

Project Coordinator, Cover

Lynsey Stanford

Compositor

Maureen Forys, Happenstance Type-O-Rama

Proofreaders

Josh Chase, Word One

Kristy Eldridge, Word One

Indexer

Robert Swanson

Cover Image

Joyce Haughey

Cover Designer

Michael E. Trent

Acknowledgments

I consider anyone who has contributed to the free and open source software community to be a contributor to the book you are holding. The backbone of any Linux distribution is formed by the organizations that produce the distributions, the major projects included in Linux, and the thousands of people who give their time and code to support Linux. So, thanks to you all!

I’d like to acknowledge several contributors for their participation in previous editions. Wayne Tucker originally wrote the chapters on Debian, LAMP servers, and mail servers. Bill von Hagen has contributed updates to the SUSE, Yellow Dog, and Ubuntu chapters. Warren Wyrostek served as technical editor to this edition. Thanks to the folks at Wiley for helping me press through the project. Sara Shlaer did an excellent job helping me stay on track as I balanced my work on this book with my new full-time job with Red Hat. Katie Wisor shepherded the book through the production process. Thanks to Margot Maley Hutchison and Maureen Maloney from Waterside Productions for contracting the book for me with Wiley.

And finally, special thanks to my wife, Sheree. There’s no way I could do the work I do without the solid support I get on the home front. I love you, and thanks for taking such good care of Seth, Caleb, and me.

Introduction

Insert the DVD or CD that comes with this book into a PC. Within five minutes, you’ll be able to try out Linux with a full range of desktop applications. Within an hour, you can have a full-blown Linux desktop or server system installed on your computer. If you are like most of us who have been bitten by the Linux bug, you won’t ever look back.

Linux Bible 2010 Edition is here to open your eyes to what Linux is, where it came from, and where it’s going. But, most of all, the book is here to hand you Linux and help you get started. Because Linux is the operating system of free speech and free choice, Linux Bible gives you choices in selecting the Linux that is right for you.

On the DVD and CD that come with this book are 18 different Linux distributions that you are free to install, try out, and keep. You learn how those distributions are alike or different, and the book leads you through the basics of installing and setting up your Linux system as:

The Linux systems you have in your hand don’t contain trialware or otherwise-hobbled software. On the contrary, they feature software created by world-class development projects, the same teams that build the software that powers many professional businesses, schools, home desktops, and Internet service providers. In other words, this truly first-rate software is from developers who have made a commitment to producing software that can be used in the ways that you choose to use it.

Most of the Linux distributions offered on the DVD and CD that come with this book are live CDs that let you try a Linux distribution without installing. Almost all of those live CDs include features that let you install the contents of those live CDs to your hard disk. For example, you can try out Fedora, Gentoo, Ubuntu, openSUSE, PCLinuxOS, and Mandriva as live CDs, and then install those distributions permanently to your hard drive from icons on the desktops of those live CDs.

Unlike some other books on Linux, this book doesn’t tie you to one Linux distribution. The book teaches you the essentials of Linux graphical desktop interfaces, shell commands, and basic system administration. Separate chapters break down many of the major Linux distributions available today. Then descriptions of the major software projects in most Linux distributions (KDE and GNOME desktops, Apache Web servers, Samba file and printer sharing, and so on) guide you in setting up and using those features, regardless of which Linux you choose.

Understanding the Linux Mystique

This book is designed to spark your imagination about what is possible with Linux, then give you the software and instruction to jump right into Linux. From there, the approach is to help you learn by using it.

In the first two chapters, you’ll learn a lot of exciting ways Linux is being used today and see who many of the major players are in the free and open source software (FOSS) world. You will see how people are adapting Linux to run on handhelds, mini laptops, 32- and 64-bit PCs, Macs, mainframes, and super computers. Linux is truly everywhere!

However, if you are concerned that somehow “free” software is too good to be true, skip ahead for the moment to the brief history of Linux in Appendix B. That appendix guides you through the strange and circuitous path of free and open source software development that led to the Linux phenomenon.

If you are intrigued by what you learn here, I’ll tell you how you can become part of the open source and free software communities, whose stars are known by a single name (such as Linus) or a few initials (such as rms). You’ll find a staggering number of open source projects, forums, and mailing lists that are thriving today (and always looking for more people to get involved).

How This Book Is Organized

Learn the basics of what goes into Linux and you will be able to use all sorts of devices and computers in the future. The book is organized in a way that enables you to start off at the very beginning with Linux, but still grow to the point where you can get going with some powerful server and programming features, if you care to.

Part I includes two short chapters designed to open your eyes to what you can do with Linux, then get your hands on it quickly. Those two chapters describe

In Part II, you start in with details on how to use Linux desktops and associated applications. Chapters 3–7 describe

In Part III, you learn how to administer Linux systems, including

Linux creates powerful servers, and in Part IV you learn to

If you don’t have Linux installed yet, this book helps you understand differences in Linux distribution, then install the systems you want from the DVD and CD included in this book. Part V (Chapters 17 through 28) describes each of those distributions and how to run them live or install them.

If you are coming to Linux for its programming environment, Part VI provides chapters that describe

In addition, Appendix A tells you what’s on the DVD and CD, how to install from the DVD or CD, and how to burn additional installation CDs from the software that comes with this book. Appendix B provides history and background information about Linux.

What You Will Get from This Book

By the time you finish this book, you’ll have a good basic understanding of many of the major features in Linux and how you can use them. If you decide then that you want to go a bit deeper, try the Fedora 12 Bible or the Red Hat Enterprise Linux Bible (both from Wiley, 2010), with content that includes how to set up many different types of Linux servers. You can find similar books for other distributions.

If you are more technically oriented, Linux Troubleshooting Bible (Wiley, 2004) can be a good way to learn more advanced skills for securing and troubleshooting Linux systems. Or a Linux Toolbox book for Fedora, Ubuntu, BSD, or SUSE (Wiley, 2007 and 2008) can provide you with more than 1,000 Linux command lines to help you become a Linux power user.

If you are looking for some fun, try out some projects with an old PC and free software from Linux Toys II (Wiley, 2006).

Conventions Used in This Book

Throughout the book, special typography indicates code and commands. Commands and code are shown in a monospaced font:

This is how code looks.

In the event that an example includes both input and output, the monospaced font is still used, but input is presented in bold type to distinguish the two. Here’s an example:

ftp ftp.handsonhistory.com

Name (home:jake): jake

Password: ******

As for styles in the text:

The following items call your attention to points that are particularly important.

Note

A Note box provides extra information to which you need to pay special attention.

Tip

A Tip box shows a special way of performing a particular task.

Caution

A Caution box alerts you to take special care when executing a procedure, or damage to your computer hardware or software could result.

Cross-Reference

A Cross-Reference box refers you to further information on a subject that you can find outside the current chapter.

Coming from Windows

A Coming from Windows box provides tips to help you transfer your knowledge of Windows systems to the Linux world.

The On the CD and On the DVD icons point out features related to the media that accompany the book.

Part I: Getting off the Ground with Linux

In This Part

Chapter 1: Starting with Linux

Chapter 2: Linux Projects, Activities, and Careers