Linux Bible 2010 Edition - Christopher Negus - E-Book

Linux Bible 2010 Edition E-Book

Christopher Negus

4,8
54,60 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

The definitive guide to the basics of one of the most popularoperating systems in the worldWhether you're a first-time Linux user or you're migrating fromanother operating system, this book is an ideal introductory guidefor getting comfortable with the building-block nature of Linux.Written by bestselling author Christopher Negus, this guide ispacked with in-depth descriptions on the basics of Linux desktops,servers, and programming tools and gets you up to speed on all thenew and exciting features of the newest version: Linux 2010. Neguswalks you through transitioning from Windows or Mac and helps youfind the Linux distribution that best meets your needs.You'll explore more than 18 Linux distributions, including thelatest versions of Ubuntu, Fedora, Debian, OpenSUSE, Slackware,Knoppix, Gentoo, Mandriva, SLAX, and more. Plus, you'll discoverhow to set up secure, fully functioning Linux server systems andget up-to-date installation advice.Topics Covered:* Getting off the Ground with Linux* Running a Linux Desktop* Learning System Administration Skills* Setting Up Linux Servers* Choosing and Installing Different Linux Distributions* Programming in LinuxLinux Bible 2010 Edition walks you through the details of thevarious Linux distributions and updates you on the latestnetworking, desktop, and server enhancements.Note: CD-ROM/DVD and other supplementary materials arenot included as part of eBook file.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 1589

Veröffentlichungsjahr: 2010

Bewertungen
4,8 (16 Bewertungen)
13
3
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



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

Linux® Bible 2010 Edition

Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256www.wiley.com

Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-0-470-48505-7

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright 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 Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work 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 services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

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

Library of Congress Control Number: 2009937839

Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Linux is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book.

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:

A desktop computer user—You have a full range of office, music, gaming, graphics, and other applications to use.A Linux system administrator—Learn how to install software, use shell commands, configure system services, and secure your computers and networks.A Linux server administrator—Using some of the world’s best server software, you can set up your computer to be a Web server, file server, mail server, or print server.A software developer—You can draw on thousands of open source programming tools to develop your own software applications.

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

How others use Linux, how to transition to Linux from Windows, and how to start with Linux using the CD and DVD inside this book (Chapter 1)What you can do, what you can make, and what you can become with Linux (Chapter 2)

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

The KDE, GNOME, and other desktop interfaces (Chapter 3)Tools for playing music and video (Chapter 4)Desktop publishing and Web publishing using word processing, layout, drawing, and image manipulation tools, plus tools such as wikis, blogs, and content management systems for managing content online (Chapter 5)Applications for e-mail and Web browsing(Chapter 6)Desktop gaming applications (Chapter 7)

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

Installing Linux systems (Chapter 8)Using the shell (Chapter 9)Doing basic administration (Chapter 10)Connecting to the Internet (Chapter 11)Securing your Linux system (Chapter 12)

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

Set up a Web server using Apache, MySQL, and PHP in Linux (Chapter 13)Run a mail server (Chapter 14)Share printers with a CUPS print server (Chapter 15)Share files with a Samba or NFS file server (Chapter 16)

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

Programming environments and interfaces (Chapter 29)Programming tools and utilities (Chapter 30)

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:

New terms and important words appear in italics when introduced.Keyboard strokes appear like this: Ctrl+A.Filenames, URLs, and code within the text appear like so: persistence.properties.

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

Chapter 1: Starting with Linux

In This Chapter

Getting started with LinuxUnderstanding LinuxLinux features and advantages

With Linux, you are free to erase your computer’s entire hard disk and run nothing but free (as in freedom) software on it. As an alternative, you could run Linux from a live CD (ignoring your computer’s contents without changing them) or install Linux to dual boot with your Windows or Mac OS X system as you choose. The bottom line is that with Linux you are free to do as YOU choose with your computer.

In only a few years, Linux has advanced from being considered a specialty operating system into the mainstream. Precompiled and configured Linux systems can be installed with no technical expertise. Versions of Linux run on all kinds of devices, from PCs to handhelds (see www.linuxdevices.com) to game consoles (such as PlayStation 3) to supercomputers to Mars rovers. In short, Linux has become a system that almost anyone can run almost anywhere.

On both desktop and server computers Linux has become a formidable operating system across a variety of business applications. Today, large enterprises can deploy thousands of systems using Linux distributions from companies such as Red Hat, Inc. and Novell, Inc. Small businesses can put together the mixture of office and Internet services they need to keep their costs down.

The free and open source software (FOSS) development model that espoused sharing, freedom, and openness is now on a trajectory to surpass the quality of other operating systems outside of the traditional Linux servers and technical workstations. What were once weak components of Linux, such as easy-to-use desktops, multimedia codecs and limited driver availability, have improved at a rapid pace. In areas of security, usability, connectivity, and network services, Linux has continued to improve and outshine the competition.

Computer industry heavy-hitters such as Microsoft and Oracle have taken notice of Linux. Microsoft has struck agreements with Linux companies including Novell and Xandros to form partnerships that primarily protect those companies against threatened Microsoft lawsuits. Oracle began producing its own enterprise-targeted Linux system to try to stem the flow of customers to Red Hat Enterprise Linux.

What does this all add up to? A growing swirl of excitement around the operating system that the big guys can’t seem to get rid of. For people like yourself, who want the freedom to use your computer software as you like, it means great prospects for the future.

Let this book help you grab your first look at the distributions, applications, services, and community that make up the phenomenon that has become Linux.

Taking Your First Step

In your hands, you have 18 different Linux distributions (on CD and DVD), thousands of applications, and descriptions for getting it all running on your own computer. For you right now, the worldwide Linux phenomenon is just a reboot away.

Linux Bible 2010 Edition brings you into the world of free and open source software that, through some strange twists and turns, has fallen most publicly under the “Linux” banner. Through descriptions and procedures, this book helps you

Understand what people do with Linux and how you can use Linux for all your computing tasks.Sort through the various distributions of Linux to choose one (or more) that is right for you. You get several Linux systems on this book’s CD and DVD. (Linux is all about choice, too!)Try out Linux as a desktop computer, server computer, or programmer’s workstation.Become connected to the open source software movement, as well as many separate high-quality software projects that are included with Linux.

What comes in Linux systems?

Whether you are using Linux for the first time or just want to try out a new Linux distribution, Linux Bible 2010 Edition is your guide to using Linux and the latest open source technology. Although different Linux distributions vary in the exact software they include, this book describes the most popular software available for Linux to

Manage your desktop (menus, icons, windows, and so on)Listen to music, watch video, and store and arrange digital photosCreate, lay out, manipulate, and publish documents and images on paper or on the WebBrowse the Web and send e-mailPlay gamesFind thousands of other open source software packages you can get for free

Because most Linux distributions also include features that let them act as servers (in fact, that’s one of the things Linux has always been best at), you’ll also learn about software available for Linux that lets you do the following:

Connect to the Internet or other networkUse Linux as a firewall and router to protect and manage your private networkRun a Web server (using Apache, MySQL, and PHP)Run a mail server (using Exim, Sendmail or other mail transfer agent)Run a print server (using Samba or CUPS)Run a file server (using vsFTPd or Samba)Use the exact same enterprise-quality software used by major corporations (such as Google and Amazon.com), universities, and businesses of all sizes

This book guides you through the basics of getting started with these Linux features, plus many more. After you’ve been through the book, you should be proficient enough in the basics to track down answers to your more advanced questions through the volumes of man pages, FAQs, HOWTOs, and forums that cover different aspects of the Linux operating system.

To get started with Linux right now, all you need is a standard PC with a bootable CD or DVD drive.

What do you need to get started?

Although Linux runs great on many low-end computers (even some old 486s and early Pentiums), if you are completely new to Linux, I recommend that you start with a PC that has a little more muscle. Here’s why:

Full-blown Linux operating systems with complete GNOME or KDE desktop environments (see Chapter 3) perform poorly on slow CPUs and less than the recommended amount of RAM. The bells and whistles come at the price of processing power. Lighter-weight options (such as the Xfce or LXDE desktop environments) often run well on computers that have limited resources, but they may offer fewer features.You can use streamlined graphical Linux installations that fit on small hard disks (as small as 100MB) and run fairly well on slow processors. Also, small live CD Linux distributions, such as Damn Small Linux (DSL), can be copied to hard disk and run from there (read about some of these small “bootables” in Chapter 28). The 50MB DSL desktop system can run fine on old Pentium machines with little RAM. But if you want to add some of the more demanding applications to these small systems, such as OpenOffice.org office applications, you will find you need more than minimal computer hardware.

If you are starting with a Pentium II, 400 MHz, your desktop will run slowly in default KDE or GNOME configurations with less than 128MB of RAM. A simpler desktop system, with just X and a window manager, will work, but won’t give you the full flavor of a Linux desktop. (See Chapter 3 for information about different desktop choices and features.)

The good news is that cheap desktop PCs or netbooks that you can buy from big box retailers start at less than $200. Those systems will perform better than most PCs you have laying around that are more than a few years old, and some even come with Linux pre-installed. The bottom line is that the less you know about Linux, the more you should try to have computer hardware that is up to spec to have a pleasant experience.

Starting right now

If you are anxious to get started, insert either the DVD or CD accompanying this book into the appropriate drive on your PC and reboot. When you see the boot screen, press Enter. When the DVD or CD boots, the following happens, respectively:

KNOPPIX starts up. A fully functional KNOPPIX desktop Linux system will boot directly from the DVD. From that Linux system, you can do everything you would expect to do from a modern desktop computing system: write documents, play music, communicate over the Internet, work with images, and so on. If you have a wired Ethernet connection that connects to the Internet when you started up Windows, most likely it will also connect automatically when KNOPPIX starts.Damn Small Linux starts up. This small, amazing desktop-oriented Linux system starts up directly from the CD that comes with this book. Besides being expandable and adaptable, DSL runs on everything from low-end PCs to powerful workstation hardware while being small enough to fit on a mini CD (it’s only about 50MB in size).

What you have in front of you is a functioning desktop system that you can install to your hard disk to use permanently, if you like. You can choose to add software from among thousands of software packages available for Linux. Depending on your Linux system, installing extra software might just take a few clicks.

The next sections step you through a few things you can do with KNOPPIX and Damn Small Linux.

Trying KNOPPIX

When KNOPPIX starts up, you bypass a login screen and go directly to a Lightweight X11 Desktop Environment (LXDE) that is loaded with free software for you to try. Figure 1-1 shows an example of the KNOPPIX LXDE desktop with desktop effects enabled. The image shows a window exploding as it is closed.

Note

If you have any trouble starting KNOPPIX, see Chapter 21 for descriptions of boot options to help you overcome certain problems (such as a garbled screen or hanging when certain hardware is encountered). That chapter also describes other KNOPPIX features. ♦

Figure 1-1: The KNOPPIX live Linux CD contains the KDE desktop and hundreds of applications.

Here is a quick tour of the KNOPPIX desktop:

Browsing—Select the Web Browser icon from the bottom panel to open the IceWeasel browser. The IceWeasel browser is a version of the Firefox Web browser that was rebranded by the Debian project (http://geticeweasel.org). Managing files—Select the My Documents icon from the desktop. A PCMan File Manager window opens to show your home folder (/home/knoppix). You will typically save files and folders to your home folder. Because you are running KNOPPIX as a live CD, any files you create will be lost when you reboot if you don’t explicitly save them. Chapter 21 describes how to make a persistent desktop, so you can save the files you create in KNOPPIX permanently.Accessing disks—A live CD, such as KNOPPIX, is designed to run without touching the contents of your hard disk. However, if you have something on your hard disk you want to use with KNOPPIX (such as a music file or document), KNOPPIX makes doing it easy.

Entries appear in the left column of the file manager, representing every partition on your hard disk, as well as detected removable media (such as a USB flash drive). In Figure 1-1, Volume entries represent several partitions on your hard disk. Select an icon to display the contents of the partition in that file manager window. To add content to that disk partition, simply drag and drop files from the desktop, or copy, move, or otherwise create files from the shell.

Special Knoppix features—Because of the temporary nature of a live CD, you have to configure settings each time you boot, unless you take steps to save those settings. From the LXDE icon on the left side of the bottom panel, you can see a menu of selections to do special things to make KNOPPIX run from your hard disk. Select System Tools ⇒ KNOPPIX HD Install to install KNOPPIX so you can run it from your hard disk.

Other KNOPPIX features are also available from that menu. You can select Install Components to add non-free software, such as Flash plug-ins or Windows fonts. Chapter 21 describes other KNOPPIX features.

Running Applications—Select the LXDE icon from the lower-left corner of the panel to see a menu of available applications. Choose Office to select from several OpenOffice.org office applications for writing documents, using spreadsheets, drawing pictures, and building presentations. Try out some communications applications, such as Icedove mail reader and Pidgin Internet Messenger, from the Network menu.

When you are done trying KNOPPIX, select Log Out from the LXDE menu and choose Shut Down. After KNOPPIX shuts down, it ejects the disc. After you remove the disc, you can use your computer again with whatever operating system you have installed there.

Trying Damn Small Linux

Because Damn Small Linux (DSL) is based on KNOPPIX, you may notice some similarities. DSL is smaller and faster, however, so you should get to the DSL desktop screen quicker. Instead of LXDE, the DSL desktop features a simple window manager. Figure 1-2 shows an example of a Damn Small Linux desktop with several applications open.

Note

Many of the same boot options that come with KNOPPIX will work with DSL, so check Chapter 21 if you have trouble booting DSL. For other descriptions of DSL, see Chapter 28. ♦

Figure 1-2: Damn Small Linux provides an efficient desktop Linux.

Here are some things to try on your DSL desktop:

Web browsing—With an active wired Internet connection, you should be able to connect to the Internet automatically when DSL boots up. The Dillo Web browser opens to a page of basic DSL information. Continue to browse the Web from Dillo, or open the Firefox icon from the desktop to browse with Firefox instead.Install applications—Open the MyDSL icon from the desktop and then, when prompted, download the applications database. After that, select categories from the left column to look through listings of hundreds of applications you can add to DSL. When you find one you like, choose Install Selected to download and install it. Check out the desktop—On the desktop itself, view information about your computer (CPU Usage, RAM, Swap, file systems, and so on) in the upper-right corner. Select DSL in the lower-left corner of the bottom panel to see a menu of available applications. Then try a few applications. You can view the same menu by right-clicking on the desktop.Change settings—Select Setup from the main menu to adjust the date and time, change your desktop theme, configure your X display server, or set up a wireless or dial-up Internet connection.Control the system—Select System from the menu and choose Control Panel. From the Control Panel that appears, you can configure your printer, back up your files (remember that files disappear at reboot with live CDs if you don’t save them to disk or removable media), or start login (SSH) or FTP services. Return to the main menu and select Apps ⇒ Tools to do some cool, specialized DSL features, such as install to hard disk or portable USB flash drive (pendrive). You can also remaster a MyDSL CD or make a boot floppy. Trying applications—Figure 1-2 shows a couple of applications open on the DSL desktop. Open the MyDSL folder to see application packages you can install (shown upper left). Select Apps ⇒ Net to see applications you could use to access the Internet (such as email clients, web browsers and instant messaging clients).

Select the Exit icon from the desktop and choose Shutdown or Reboot to exit from DSL. Notice that the Backup box is selected. With that box selected, DSL gives you the option to save your files and settings (provided you set up a location to back up your files earlier from the Control Panel). With that information saved, the next time you boot DSL from that computer, you have those files and settings available.

Trying other Linux distributions

Of course you can try many other Linux distributions from the CD and DVD that come with this book besides KNOPPIX and Damn Small Linux. Ubuntu has a large, active following and can be run live from the DVD. Try Fedora or openSUSE if you want to try a Linux system that is being prepared for enterprise distros (Red Hat Enterprise Linux and SUSE Linux Enterprise, respectively).

Gentoo and Slackware often appeal to technically oriented users. On small machines, distros such as Puppy Linux or BackTrack may interest you. See Appendix A for information on these and other Linux systems included with this book.

Understanding Linux

People who don’t know what Linux is sometimes ask me whether it’s a program that runs on Microsoft Windows. When I tell them that Linux is, itself, an operating system like Windows and that they can remove (or never purchase) Windows, I sometimes get a surprised reaction, “A PC can run with nothing from Microsoft on it?” The answer is yes!

The next question about Linux is often, “How can Linux be free?” Although the full answer to that is a bit longer (and covered later), the short answer is, “Because the people who write the code license it to be freely distributed.” Keep in mind, however, that the critical issue relating to the word “free” is “freedom,” meaning that you are free to rebuild, reuse, reconfigure, and otherwise do what you like with the code. The only major responsibility is that if you change the software, you pass it forward so that others may benefit from your work as well.

Linux is a full-blown operating system that is a free clone of the powerful and stable UNIX operating system. Start your computer with Linux, and Linux takes care of the operation of your PC and manages the following aspects of your computer:

Processor—Because Linux can run many processes from many different users at the same time (even with multiple CPUs on the same machine), Linux needs to be able to manage those processes. The Linux scheduler sets the priorities for running tasks and manages which processes run on which CPUs (if multiple processors are present). You can tune the scheduler differently for different types of Linux systems. If the scheduler is tuned properly, the most important processes get the quickest responses from the processor. For example, a Linux scheduler on a desktop system gives higher priority to things such as moving a window on the desktop than it does to a background file transfer.Memory—Linux tries to keep processes with the most immediate need in RAM, while managing how processes that exceed the available memory are moved to swap space. Swap space is a defined area on your hard disk that’s used to handle the overflow of running processes and data. When RAM is full, processes are placed in swap space. When swap space is full (something that you don’t want to happen), new processes can’t start up.Devices—Linux supports thousands of hardware devices, yet keeps the kernel a manageable size by including only a small set of drivers in the active kernel. Using loadable modules, the kernel can add support for other hardware as needed. Modules can be loaded and unloaded on demand, as you add and remove hardware. (The kernel, described in detail a bit later on, is the heart of a Linux operating system.)File systems—File systems provide the structure in which files are stored on hard disk, CD, DVD, floppy disks, or other media. Linux knows about different file system types (such as Linux ext3 and reiserfs file systems, or VFAT and NTFS from Windows systems) and how to manage them.Security—Like UNIX, Linux was built from the ground up to enable multiple users to access the system simultaneously. To protect each user’s resources, every file, directory, and application is assigned sets of read, write, and execute permissions that define who can access them. In a standard Linux system, the root user has access to the entire system, some special logins have access to control particular services (such as Apache for Web services), and users can be assigned permission individually or in groups. Recent features such as Security Enhanced Linux and AppArmor enable more refined tuning and protection in highly secure computing environments.

What I have just described are components that are primarily managed by what is referred to as the Linux kernel. In fact, the Linux kernel (which is still maintained by Linus Torvalds, who created the Linux kernel as a graduate student in Finland) is what gives Linux its name. The kernel is the software that starts up when you boot your computer and interfaces with the programs you use so they can communicate effectively and simply with your computer hardware.

Note

See Appendix B for historic details on how the kernel and other free software came together to create the Linux phenomenon. ♦

Components such as administrative commands and applications from other free and open source software projects work with the kernel to make Linux a complete operating system. The GNU project (www.gnu.org), in particular, contributed many implementations of standard UNIX components that are now in Linux. Apache, KDE, GNOME, and other major open source projects in Linux have also contributed to the success of Linux. (See Chapter 2 for an explanation of how open source projects work and how you can get involved in them.) Those other projects added such things as

Graphical user interfaces (GUIs)—Consisting of a graphical framework (typically the X Window System), window managers, panels, icons, and menus. GUIs enable you to use Linux with a keyboard and mouse combination, instead of just typing commands (as was done in the old days).Administrative utilities—Including hundreds (perhaps thousands) of commands and graphical windows to do such things as add users, manage disks, monitor the network, install software, and generally secure and manage your computer.Applications—Although no Linux distribution includes all of them, literally thousands of games, office productivity tools, Web browsers, chat windows, multimedia players, and other applications are available for Linux.Programming tools—Including programming utilities for creating applications and libraries for implementing specialty interfaces.Server features—Enabling you to offer services from your Linux computer to another computer on the network. In other words, while Linux includes Web browsers to view Web pages, it can also be the computer that serves up Web pages to others. Popular server features include Web, mail, database, printer, file, DNS, and DHCP servers.

After Linus Torvalds and friends had a working Linux kernel, pulling together a complete open source operating system was possible because so much of the available “free” software was

Covered by the GNU Public License (GPL) or similar license—That allowed the entire operating system to be freely distributed, provided guidelines were followed relating to how the source code for that software was made available going forward (see http://www.gnu.org/licenses/gpl.html).Based on UNIX-like systems—Clones of virtually all the other user-level components of a UNIX system had been created. Those and other utilities and applications were built to run on UNIX or other UNIX-like systems.

Linux has become one of the most popular culminations of the open source software movement. But the traditions of sharing code and building communities that made Linux possible started years before Linux was born. You could argue that it began in a comfortable think tank known as Bell Laboratories. Read Appendix B to learn more about the history of Linux.

Leveraging work done on UNIX and GNU projects helped to get Linux up and running quickly. The culture of sharing in the open source community and adoption of a wide array of tools for communicating on the Internet have helped Linux to move quickly through infancy and adolescence to become a mature operating system.

The simple commitment to share code is probably the single most powerful contributor to the growth of the open source software movement in general, and Linux in particular. That commitment has also encouraged involvement from the kind of people who are willing to contribute back to that community in all kinds of ways. The willingness of Linus Torvalds to incorporate code from others in the Linux kernel has also been critical to the success of Linux.

What’s So Great About Linux??

If you have not used Linux before, you should expect a few things to be different from using other operating systems. Here is a brief list of some Linux features that you might find cool:

No constant rebooting—Uptime is valued as a matter of pride (remember, Linux and other UNIX systems are most often used as servers, which are expected to, and do, stay up 24/7/365). After the original installation, you can install or remove most software without having to reboot your computer for almost any software besides the kernel itself.Start/stop services without interrupting others—You can start and stop individual services (such as Web, file, and e-mail services) without rebooting or even interrupting the work of any other users or features of the computer. In other words, you should not have to reboot your computer every time someone sneezes. (Installing a new kernel is just about the only reason you need to reboot.)Portable software—You can usually change to another Linux, UNIX, or BSD system and still use the exact same software! Most open source software projects were created to run on any UNIX-like system and many also run on Windows systems, if you need them to. If it won’t run where you want it to, chances are that you, or someone you hire, can port it to the computer you want. (Porting refers to modifying an application or driver so it works in a different computer architecture or operating system.)Downloadable applications—If the applications you want are not delivered with your version of Linux, you can often download and install them with a single command, using tools such as apt, urpmi, and yum.No settings hidden in code or registries—After you learn your way around Linux, you’ll find that (given the right permissions on your computer) most configuration is done in plain text files that are easy to find and change. In recent years, simplified graphical interfaces have been added to make working with configuration files even easier. Because Linux is based on openness, nothing is hidden from you. Even the source code, for GPL-covered software, is available for your review.Mature desktop—The X Window System (providing the framework for your Linux desktop) has been around longer than Microsoft Windows. The KDE and GNOME desktop environments provide graphical interfaces (windows, menus, icons, and so forth) that rival those on Microsoft systems. You have the freedom to choose lightweight window managers instead as well. Ease-of-use problems with Linux systems are rapidly evaporating.Freedom—Linux, in its most basic form, has no corporate agenda or bottom line to meet. You are free to choose the Linux distribution that suits you, look at the code that runs the system, add and remove any software you like, and make your computer do what you want it to do. Linux runs on everything from supercomputers, to cell phones, and everything in between. Many countries are rediscovering their freedom of choice and making the switch at government and educational levels. France, Germany, Korea, and India are just a few that have taken notice of Linux. The list continues to grow.

Some aspects of Linux make it hard for some new users to get started. One is that Linux is typically set up to be secure by default, so you must adjust to using an administrative login (root) to make most changes that affect the whole computer system. Although this can be a bit inconvenient, trust me, it makes your computer safer than just letting anyone do anything. This model was built around a true multi-user system. You can set up logins for everyone who uses your Linux computer, and you (and others) can customize your environment however you see fit without affecting anyone else’s settings.

For the same reason, many services are off by default, so you need to turn them on and do at least minimal configuration to get them going. For someone who is used to Windows, Linux can be difficult just because it is different from Windows. But because you’re reading this book, I assume you want to learn about those differences.

Summary

Getting started with Linux can be as easy as inserting the CD or DVD accompanying this book into your PC and rebooting. Using that media, you can try out 18 different Linux systems, either live or by installing them to hard disk.

You can use Linux as a desktop system (like Microsoft Windows); as a Web, file, or print server; or as a programmer’s workstation. You have a lot of flexibility when it comes to how Linux is configured and what software you install and run on it.

Because you are free to use open source software as you please, many Linux enthusiasts have come up with interesting and innovative ways to use Linux and benefit from it. Chapter 2 describes what you can do with Linux, what you can make with Linux, and what you can become with Linux.

Chapter 2: Linux Projects, Activities, and Careers

In This Chapter

What you can do with LinuxWhat you can make with LinuxHow you can become involved with Linux

The primary objective of this book is to lead you through the most popular ways of using Linux as a desktop, server, or programmer’s workstation. After you become comfortable using Linux, however, you’ll begin to see that these uses are just the tip of the iceberg.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!



Tausende von E-Books und Hörbücher

Ihre Zahl wächst ständig und Sie haben eine Fixpreisgarantie.