www.it-ebooks.info www.it-ebooks.info RUNNING LINUX www.it-ebooks.info Other Linux resources from O’Reilly Related titles Linux Cookbook™ Linux Desktop Hacks™ Linux Desktop Pocket Guide Linux in a Nutshell Linux in a Windows World Linux Multimedia Hacks™ Linux Network Administrator’s Guide Linux Pocket Guide Linux Server Hacks™ Linux Server Security LPI Linux Certification in a Nutshell OpenOffice.org Writer SELinux Version Control with Subversion Linux Books Resource Center linux.oreilly.com is a complete catalog of O’Reilly’s books on Linux and Unix and related technologies, including sample chapters and code examples. ONLamp.com is the premier site for the open source web plat- form: Linux, Apache, MySQL, and either Perl, Python, or PHP. Conferences O’Reilly brings diverse innovators together to nurture the ideas that spark revolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Visit con- ferences.oreilly.com for our upcoming events. Safari Bookshelf (safari.oreilly.com) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free. www.it-ebooks.info RUNNING LINUX FIFTH EDITION Matthias Kalle Dalheimer and Matt Welsh Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo www.it-ebooks.info Running Linux, Fifth Edition by Matthias Kalle Dalheimer and Matt Welsh Copyright © 2006, 2002, 1999, 1996, 1995 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/insti- tutional sales department: (800) 998-9938 or corporate@oreilly.com. Editor: Andy Oram Production Editor: Adam Witwer Production Services: Argosy Publishing Cover Designer: Edie Freedman Interior Designer: David Futato Printing History: May 1995: First Edition. August 1996: Second Edition. August 1999: Third Edition. December 2002: Fourth Edition. December 2005: Fifth Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Linux series designations, Running Linux, images of the American West, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN-10: 0-596-00760-4 ISBN-13: 978-0-596-00760-7 [M] [10/06] www.it-ebooks.info This is the Title of the Book, eMatter Edition Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved. v Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Part I. Enjoying and Being Productive on Linux 1. Introduction to Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 About This Book 5 Who’s Using Linux? 6 System Features 8 About Linux’s Copyright 22 Open Source and the Philosophy of Linux 25 Sources of Linux Information 30 Getting Help 32 2. Preinstallation and Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Distributions of Linux 34 Preparing to Install Linux 37 Post-Installation Procedures 49 Running into Trouble 53 3. Desktop Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Why Use a Graphical Desktop? 67 The K Desktop Environment 68 KDE Applications 79 The GNOME Desktop Environment 88 GNOME Applications 94 www.it-ebooks.info vi | Table of Contents 4. Basic Unix Commands and Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Logging In 103 Setting a Password 104 Virtual Consoles 105 Popular Commands 105 Shells 110 Useful Keys and How to Get Them to Work 111 Typing Shortcuts 112 Filename Expansion 114 Saving Your Output 116 What Is a Command? 119 Putting a Command in the Background 120 Remote Logins and Command Execution 121 Manual Pages 123 Startup Files 125 Important Directories 127 Basic Text Editing 128 Advanced Shells and Shell Scripting 129 5. Web Browsers and Instant Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 The World Wide Web 135 Instant Messaging 142 6. Electronic Mail Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Using KMail 150 Using Mozilla Mail & News 156 Getting the Mail to Your Computer with fetchmail 157 OpenPGP Encryption with GnuPG 159 7. Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Gaming 167 Quake III 168 Return to Castle Wolfenstein 173 Unreal Tournament 2004 177 Emulators 182 Frozen Bubble 188 Tux Racer 190 www.it-ebooks.info Table of Contents | vii 8. Office Suites and Personal Productivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Using OpenOffice 194 KOffice 240 Other Word Processors 248 Synching PDAs 250 Groupware 254 Managing Your Finances 260 9. Multimedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Multimedia Concepts 278 Kernel and Driver Issues 283 Embedded and Other Multimedia Devices 290 Desktop Environments 290 Windows Compatibility 292 Multimedia Applications 292 Multimedia Toolkits and Development Environments 328 Solutions to Common Problems 330 References 332 Part II. System Administration 10. System Administration Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Maintaining the System 336 Managing Filesystems 340 Managing Swap Space 359 The /proc Filesystem 363 Device Files 366 Scheduling Recurring Jobs Using cron 369 Executing Jobs Once 374 Managing System Logs 375 Processes 378 Programs That Serve You 382 11. Managing Users, Groups, and Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Managing User Accounts 384 File Ownership and Permissions 394 Changing the Owner, Group, and Permissions 397 www.it-ebooks.info viii | Table of Contents 12. Installing, Updating, and Compiling Programs . . . . . . . . . . . . . . . . . . . . . . . 401 Upgrading Software 401 General Upgrade Procedure 403 Automated and Bulk Upgrades 413 Upgrading Software Not Provided in Packages 420 Archive and Compression Utilities 429 13. Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 Networking with TCP/IP 440 Dial-Up PPP 460 PPP over ISDN 468 ADSL 477 Cable Modems 478 Network Diagnostics Tools 479 14. Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 Printing 484 Managing Print Services 492 15. File Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 Sharing Files with Windows Systems (Samba) 523 NFS and NIS Configuration 562 16. The X Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 A History of X 571 X Concepts 572 Hardware Requirements 573 Installing X.org 575 Configuring X.org 576 Running X 584 Running into Trouble 584 X and 3D 586 17. System Start and Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 Booting the System 590 System Startup and Initialization 598 Single-User Mode 604 Shutting Down the System 605 A Graphical Runlevel Editor: KSysV 606 www.it-ebooks.info [...]... of the book can help you, along with online documentation and more specialized texts This is the Title of the Book, eMatter Edition www.it-ebooks.info Copyright © 2007 O’Reilly & Associates, Inc All rights reserved www.it-ebooks.info Chapter 1 CHAPTER 1 Introduction to Linux Welcome to Running Linux, Version 5! When we wrote the first edition of this book, Linux had barely arrived on the scene Our task... the Linux code or visit its documentation site If you started counting people who have contributed to the development of Linux and its associated projects, you would see hundreds of thousands of individuals Linux and open source software developers come from many walks of life Major computer vendors such as IBM, HP, Novell, Red Hat, Sun, Dell, and others pay portions of their staffs to work on Linux. .. contributed to Linux During the 1990s, Linux generated more excitement in the computer field than any other development since the advent of microprocessor technology Linux rejuvenated a dying technology sector following the fall of the dot-com boom in the spring of 2001 Today, Linux has surpassed the expectations of informed observers worldwide, including the authors of this book Early on, Linux inspired... Access Protocol (LDAP) Linux makes it easy to share files, support remote logins, and run applications on other systems A software suite called Samba allows a Linux machine to act as a Windows server in Active Directory environments The combination of Linux and Samba for this purpose is faster (and less expensive) than running Windows Server 2003 In fact, given the ease with which Linux supports common... come to Linux in fact, the developers who helped Linus Torvalds create Linux are still a formidable community The Linux kernel mailing lists see a great deal of activity, and it’s the place to be if you want to stay on the bleeding edge of operating system design If you’re into tuning page replacement algorithms, twiddling network protocols, or optimizing buffer caches, Linux is a great choice Linux. .. (SELinux) provided by the National Security Agency (http://www nsa.gov/selinux) SELinux provides the most trusted computing environment available today Now add Linux s ability to provide virtualization at the kernel level Through Xen (http://sourceforge.net/projects/xen), Linux can securely execute multiple virtual machines, each running its own operating system, on a single physical system This allows... direction, Linux is being considered for top-of-the-line computers as well Hewlett-Packard has a supercomputer with Linux as the operating system A large number of scalable clusters—supercomputers built from arrays of PCs—run Linux as well Linux supports various filesystem types for storing data Some filesystems, such as the Second Extended Filesystem (ext2fs), have been developed specifically for Linux. .. language such as C, and “compiling” the document into a printable form The most famous text formatting language is HTML, the markup language used by virtually every page on the World Wide Web Another popular text processing language is DocBook XML, a kind of industry-standard set of tags for marking up technical documentation, which is also used by the Linux Documentation Project (to be discussed later... developed by Bell Labs); Texinfo (an extension to TEX used for software documentation by the Free Software Foundation); and Docbook Commercial Applications In addition to the more than fifteen hundred Linux applications maintained by Linux distributors such as Debian, a groundswell of support exists from commercial application developers for Linux These products include office productivity suites, word processors,... Associates, Inc All rights reserved How does Linux do all those things? Linux distributions harvest vast amounts of diverse technology, especially new and innovative developments in hardware Developers have access to all the code that makes up the operating system Although many people consider Linux the largest cooperative software development project in human history, Linux developers don’t need to even know . www.it-ebooks.info www.it-ebooks.info RUNNING LINUX www.it-ebooks.info Other Linux resources from O’Reilly Related titles Linux Cookbook™ Linux Desktop Hacks™ Linux Desktop Pocket Guide Linux in a Nutshell Linux in a Windows. World Linux Multimedia Hacks™ Linux Network Administrator’s Guide Linux Pocket Guide Linux Server Hacks™ Linux Server Security LPI Linux Certification in a Nutshell OpenOffice.org Writer SELinux Version. free. www.it-ebooks.info RUNNING LINUX FIFTH EDITION Matthias Kalle Dalheimer and Matt Welsh Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo www.it-ebooks.info Running Linux, Fifth