Running Linux, 5th Edition (2009)
Technical knowledge is not enough. One must transcend techniques so that the art becomes an artless art, growing out of the unconscious.
--Daisetsu Suzuki (1870-1966)
This is a book about Linux, a free, open source operating system that's changing the world of computing. In this book, we show how you can completely change the way you work with computers by exploring a powerful and free operating system. Linux goes against the traditional computing mainstream, being developed by a loosely organized group of thousands of volunteers across the Internet. Linux started as a real underground movement — guerrilla hacking, if you will — and brings a lot of excitement, discovery, and self-empowerment back into today's corporate-dominated computing culture. We invite you to dive in, enjoy yourself, and join the throng of people who know what it means to tweak your dot clocks and rdev your kernel image.
The Zen quote at the beginning of this preface summarizes our philosophy in this book. We're targeting readers who are inquisitive and creative enough to delve full-tilt into the world of Linux, and who want to get at the heart of the system. Linux represents a rebellion against commercial and proprietary operating systems, and many of its users like living on the edge of the latest technological trends. Of course, the casual reader can set up and run a Linux system (or hundreds of them!) without much trouble, but the purpose of this book is to dig more deeply into the system — to bring you completely into the Linux mentality, to reach Linux "enlightenment." Rather than gloss over messy details, we explain the concepts by which the system actually works so that you can troubleshoot problems on your own. By sharing the accumulated expertise of several Linux experts, we hope to give you enough confidence to call yourself a true Linux Guru. (Your first koan: what is the sound of one user hacking?)
You have in your hands the fifth edition of Running Linux, and by most accounts this book is considered the classic text on installing, maintaining, and learning to use a Linux system. The first edition was published way back in 1996, and had its roots in a free book called Linux Installation and Getting Started, which was written by Matt Welsh and is still floating around the Internet. Since Matt conceived and wrote Running Linux, the book has gone through a lot of expansion and improvement to keep up-to-date with the latest developments in the Linux world.
Kalle Dalheimer, a developer and consultant bringing a great deal of experience with both Linux development and desktop applications, has become the lead author on the past three editions. Other contributors over time have included Lar Kaufman (material on printing and other first-edition material), Tom Adelstein (updates to the introductory chapter and substantial material on VMWare, rdesktop, VNC, and FreeNX), Aaron Weber (GNOME, Evolution, Red Carpet, and ZENworks), Sam Hiser (OpenOffice), Jay Ts (Samba), John H. Terpstra (updates to Samba and NFS), Jeff Tranter (multimedia, sources of Linux information), Kyle Rankin (games), Breckin Loggins (GnuCash), Rod Smith (substantial printing material, including CUPS), Kyle Dent (Postfix), Terry Dawson (material on security), Brian Vincent (Wine and CodeWeaver), Chris Lawrence (Debian packaging), Vatafu Valerica (LAMP chapter), Marc Mutz (material on public-key encryption and encypted filesystems), Steffen Hansen (material on the GIMP, OpenGL, Postfix, and ProFTPd), Till Adam (material on groupware solutions for Linux), Jesper Pedersen (material on kimdaba and Procmail, updates to the Python section), Michel Boyer de la Giroday (PHP), Ivan Ristic (updates to Apache and LAMP chapters), and Jeffrey Dunitz (updates to the backup chapter).
As Linux attracts more and more development, becoming increasingly appealing in new areas of use, the challenge for a book like this is to continue its mission with an ever-increasing scope. This edition is much bigger than any of the previous ones, and covers topics such as desktop tools that made only cursory appearances earlier. No book can adequately capture everything there is to know about Linux, so we've tried to ask at each turn what information is most valuable for a person exploring the system and trying to get a firm basis for further self-education. Our approach has worked remarkably well over the many editions, and we think this book will be of use to you for a long time to come.
In the preface to the first edition, we said that "Linux has the potential to completely change the face of the PC operating system world." Looking back, it's clear that our prediction was right! Linux has erupted into the computing mainstream with an amazing force: it has been covered by every major media channel, has helped usher in the so-called Open Source Revolution, and is widely claimed as the most viable competitor to Microsoft's dominance in the operating systems market. Today, most estimates place the number of Linux users worldwide at well over 300 million. Linux has matured to the point where many people can dive in and start using Linux without knowing most of the hairy details behind device drivers, XFree86 configuration files, and bootloaders. Actually, a good Linux distribution these days is just as easy to install as its commercial competitors such as Microsoft Windows. Still, we think it's best to give you some of the behind-the-scenes views, so you have an understanding of the workings of the system, even if it's not strictly necessary for casual Linux use.
Organization of This Book
Each chapter of this book contains a big chunk of information. It takes you into a world of material that could easily take up several books. But we move quickly through the topics you need to know.
Part I of the book, "Enjoying and Being Productive on Linux," introduces Linux and brings you to the point where you can do all the standard activities people do on other systems: emailing, web surfing, playing games, watching videos, and so on.
Chapter 1, Introduction to Linux
Tries to draw together many different threads. It explains why Linux came to be and what it offers that continues to attract new users and developers.
Chapter 2, Preinstallation and Installation
Describes preliminary tasks that you may have to do before installation, such as partitioning your disk, and guidance for initial Linux installation and configuration.
Chapter 3, Desktop Environments
Helps you get comfortable navigating the desktop and the most important tools, including the Evolution utility for mail, calendar, and managing contacts.
Chapter 4, Basic Unix Commands and Concepts
Offers a system administrator's introduction to Unix. It is intended to give you enough tools to perform the basic tasks you'll need to do throughout the book. Basic commands are covered, along with some tips for administrators and some concepts you should know.
Chapter 5, Web Browsers and Instant Messaging
Shows neat tricks and advanced uses for some of the popular and basic computer activities: web browsing and instant messaging.
Chapter 6, Electronic Mail Clients
Introduces other mail clients, for people who want to try something besides Evolution, and shows ways to secure email.
Chapter 7, Games
Explains the impressive array of games supported on Linux, both standalone and client/server.
Chapter 8, Office Suites and Personal Productivity
Explains how you can be just as productive in your office work on Linux as on the proprietary alternatives. The main topics are the OpenOffice office suite, KOffice office suite, and the GnuCash financial application, along with an introduction to groupware.
Chapter 9, Multimedia
Discusses audio and video, covering concepts you'll find useful, configuration for systems where the tools don't work automatically, and a few common applications. The GIMP is also introduced for image manipulation.
Part II of the book, "System Administration," shows you how to set up your Linux system and its environment for such tasks as printing and sharing files with other systems; it also shows you how to take care of your system in other ways.
Chapter 10, System Administration Basics
Covers system administration topics such as filesystems and swap space that are normally handled automatically during installation, but sometimes need user intervention.
Chapter 11, Managing Users, Groups, and Permissions
Shows you the fundamental building blocks of security on Linux: managing users and access rights (permissions).
Chapter 12, Installing, Updating, and Compiling Programs
Covers system updates, which are important both to get new features and applications and to fix security flaws.
Chapter 13, Networking
Is a basic introduction to networking, which is usually set up during installation but is worth understanding at a deeper level. The chapter shows you how to configure your system so that it can work on a local area network or communicate with an Internet service provider using Point-to-Point Protocol (PPP). ISDN and ADSL are also covered.
Chapter 14, Printing
Shows you how to get Linux to recognize printers and to manage document printing.
Chapter 15, File Sharing
Covers file sharing, with a particular focus on Samba, which allows both file and printer sharing with Windows systems.
Chapter 16, The X Window System
Shows you how to configure the X Window System, which underlies the desktops introduced in Chapter 3. We show you how to overcome problems you might encounter when your distribution installs the software and how to configure it for the best performance on your video hardware.
Chapter 17, System Start and Shutdown
Covers system startup and shutdown. Topics include the GRUB bootloader, which lets you choose between operating systems at startup time, and how to get the right services going.
Chapter 18, Configuring and Building the Kernel
Explains how to update the kernel and its modules, which may be necessary to run new Linux features or get drivers installed for your hardware.
Part III of the book, "Programming," starts exploring interesting advanced topics that make Linux a powerful asset, such as programming.
Chapter 19, Text Editing
Offers in-depth tutorials on vi and Emacs, valuable text editors. Covers text processing, an alternative to using word processors to format text documents.
Chapter 20, Text Processing
Describes tools for producing formatted documents from markup languages, including XML and the older languages TEX, troff, and Texinfo.
Chapter 21, Programming Tools
Is a wide-ranging introduction to programming on Linux, introducing a number of languages, as well as tools that you may find it useful to understand even if you are not a programmer.
Part IV of the book, "Network Services," introduces several services and other advanced networking activities.
Chapter 22, Running a Web Server
Shows you how to set up and configure Apache, the most popular web server in the world.
Chapter 23, Transporting and Handling Email Messages
Covers the easy-to-use Postfix mail server and some other useful mail tools, such as SpamAssassin.
Chapter 24, Running an FTP Server
Shows a secure way to offer files for download.
Chapter 25, Running Web Applications with MySQL and PHP
Covers the M and P in the well-known acronym LAMP, introducing the basic configuration and use of MySQL and PHP for use with Apache.
Chapter 26, Running a Secure System
Covers the ProFTPD web server, which is convenient for serving documents to colleagues or the general public.
Chapter 27, Backup and Recovery
Basic techniques for the critical task of safeguarding your data.
Chapter 28, Heterogeneous Networking and Running Windows Programs
A wealth of ways to get the best out of two diffferent environments.
Appendix, Sources of Linux Information
Tells you about useful online documentation for Linux and other sources of help.
Conventions Used in This Book
The following is a list of the typographical conventions used in this book:
Is used for file and directory names, command names, command-line options, email addresses and pathnames, usernames, hostnames, site names, and all new terms.
Is used in examples to show the contents of files or the output from commands, to indicate environment variables and keywords that appear in code, and for Emacs commands.
Constant Width Bold
Is used in examples to show commands or other text that should be typed literally by the user.
Constant Width Italic
Is used to indicate variable options, keywords, or text that the user is to replace with an actual value.
This icon designates a note, which is an important aside to the nearby text.
This icon designates a warning relating to the nearby text.