Linux in a Nutshell
Ellen Siever
Stephen Figgins
Robert Love
Arnold Robbins
Copyright 2009 Ellen Siever, Stephen Figgins, and Robert Love
O'Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.
Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly Media, Inc. The In a Nutshell series designation, Linux in a Nutshell , the image of an Arabian horse, 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.
O'Reilly Media
Preface
This is a book about Linux, a freely available clone of the Unix operating system whose uses range from embedded systems and personal data assistants (PDAs) to corporate servers, web servers, and massive clusters that perform some of the world's most difficult computations.
Whether you are using Linux for personal software projects, for a small office or home office (the so-called SOHO environment), to provide services to a small group of colleagues, or to administer a site responsible for millions of email and web connections each day, you need quick access to information on a wide range of tools. This book covers all aspects of administering and making effective use of Linux systems. Among its topics are booting, package management, and revision control. But foremost in Linux in a Nutshell are the immeasurable utilities and commands that make Linux one of the most powerful and flexible systems available.
In addition to the tools and features written specifically for it, Linux has inherited many from the Free Software Foundation's GNU project, the Berkeley Software Distribution (BSD), the X Window System, and contributions from major corporations as well as the companies that created the major Linux distributions. More recent projects extend Linux in exciting ways, some through changes to the kernel and some through libraries and applications that radically change the user's experience.
This book is a quick reference for the basic commands and features of the Linux operating system. As with other books in O'Reilly's "In a Nutshell" series, this book is geared toward users who know what they want to do and have some idea how to do it, but can't always remember the correct command or option. The sixth edition has been examined from start to end and checked against the most common Linux distributions (Debian, Ubuntu, Fedora, and SUSE) so that it reflects the most useful and popular commands.
Organization of This Book
This book is a reference to the most important commands and utilities available on Linux systems.
, explains Linux's strengths and the key aspects of working with Linux, and lays out the scope of this book.
, introduces TCP/IP networking and the Linux commands used for system administration and network management.
, is the core of the book, a reference listing of hundreds of the most important shell commands available on Linux.
, covers the commands used to control booting on Linux, particularly LILO and GRUB.
, explains the apt series of commands that manage updating and installation on Debian, and the RPM system and yum used by Red Hat/Fedora, Novell/SUSE, and several other distributions of Linux.
, documents Bash, the default command-line interpreter on Linux.
, introduces regular expressions and explains how different tools interpret these powerful tools for searching and text processing.
, provides reference information on Emacs, a text editor and full-featured development environment.
, describes the classic vi editor that is the most popular text-manipulation tool on Linux.
, describes this "stream editor" that is useful for processing files in standardized ways.
, documents another valuable tool for processing text files, the GNU version of awk that is the default on Linux systems.
, provides the background for understanding Subversion and Git, which are valuable tools for tracking changes to files and projects, and are discussed in the following two chapters.
, provides a description of a popular source code management and version-control tool.
, describes a distributed version control system with many advanced features including the ability to access project history even when not connected to a central server.
, describes virtualization on Linux, which allows multiple virtual servers to run on a single physical server. Tools covered include Xen, KVM, the libvirt API, and the VMware command-line interface.
Other Resources
This book doesn't tell you how to install and get up to speed on a Linux system. For that, you'll probably want O'Reilly's Running Linux , by Matthias Kalle Dahlheimer and Matt Welsh, an in-depth guide suitable for all major distributions. For networking information, check out Linux Network Administrator's Guide by Tony Bautts et al. (O'Reilly). If you're new to Linux/Unix concepts, O'Reilly's Learning the Unix Operating System , by Jerry Peek et al., provides introductory information. In addition to these and other Linux titles, O'Reilly's wide range of Unix, X, web-related, and scripting and programming language titles may also be of interest.
Online Documentation
The Internet is full of information about Linux. One of the best resources is the Linux Documentation Project at http://www.tldp.org (or one of the dozens of mirror sites around the world), which has numerous short guides called HOWTOs, along with some full manuals. For online information about the GNU utilities covered in this book, consult http://www.gnu.org (also widely mirrored). The Free Software Foundation, which is in charge of the GNU project, publishes its documentation in a number of hardcopy and online books about various tools.
Each distribution maintains its own website, and contains documentation for the software it provides as well as guides to maintaining your system under that distribution.
Websites
As befits a hot phenomenon, Linux is the central subject of several websites and a frequent topic of discussion on others. Some sites offer original content; others just have links to articles posted elsewhere and threaded discussions (which can be a useful service). Among the sites frequented by Linux users are:
http://lwn.net
Linux Weekly News, a site with weekly in-depth articles and frequent news updates
http://www.linuxgazette.net
Linux Gazette, a site published monthly with articles and tips in many languages
http://www.linuxquestions.org
A very popular source for technical guidance, including a growing wiki (site maintained by user contributions) at http://wiki.linuxquestions.org
http://linuxsecurity.com
Linux Security, a collection of security-related news
http://linuxinsider.com
Linux Insider, a news feed
http://linuxtoday.com