Mark G. Sobell is President of Sobell Associates Inc., a consulting firm that specializes in UNIX/Linux training, support, and custom software development. He has more than twenty-five years of experience working with UNIX and Linux systems and is the author of many best-selling books, including A Practical Guide to Red Hat® Linux®, Third Edition; A Practical Guide to Linux® Commands, Editors, and Shell Programming; and A Practical Guide to UNIX® for Mac OS® X Users (coauthored with Peter Seebach), all from Prentice Hall, and A Practical Guide to the UNIX System from Addison-Wesley.
Praise for A Practical Guide to Ubuntu Linux®
“I am so impressed by how Mark Sobell can approach a complex topic in such an understandable manner. His command examples are especially useful in providing a novice (or even advanced) administrator with a cookbook on how to accomplish real-world tasks on Linux. He is truly an inspired technical writer!”
–George Vish II, Senior Education Consultant, Hewlett-Packard Company
“Overall, I think it’s a great, comprehensive Ubuntu book that’ll be a valuable resource for people of all technical levels.”
–John Dong, Ubuntu Forum Council Member, Backports Team Leader
“The JumpStart sections really offer a quick way to get things up and running, allowing you to dig into the details of his books later.”
–Scott Mann, Aztek Networks
“Ubuntu is gaining popularity at the rate alcohol did during prohibition, and it’s great to see a well-known author write a book on the latest and greatest version. Not only does it contain Ubuntu-specific information, but it also touches on general computer-related topics, which will help the average computer user to better understand what’s going on in the background. Great work, Mark!”
–Daniel R. Arfsten, Pro/ENGINEER Drafter/Designer
“I read a lot of Linux technical information every day, but I’m rarely impressed by tech books. I usually prefer online information sources instead. Mark Sobell’s books are a notable exception. They’re clearly written, technically accurate, comprehensive-and actually enjoyable to read.”
–Matthew Miller, Senior Systems Analyst/Administrator, BU Linux Project, Boston University Office, of Information Technology
“I would so love to be able to use this book to teach a class about not just Ubuntu or Linux but about computers in general. It is thorough and well written with good illustrations that explain important concepts for computer usage.”
–Nathan Eckenrode, New York Local Community Team
Praise for Other Books by Mark Sobell
“I currently own one of your books, A Practical Guide to Linux®. I believe this book is one of the most comprehensive and, as the title says, practical guides to Linux I have ever read. I consider myself a novice and I come back to this book over and over again.”
–Albert J. Nguyen
“Thank you for writing a book to help me get away from Windows XP and to never touch Windows Vista. The book is great; I am learning a lot of new concepts and commands. Linux is definitely getting easier to use.”
–James Moritz
“I have been wanting to make the jump to Linux but did not have the guts to do so-until I saw your familiarly titled A Practical Guide to Red Hat® Linux® at the bookstore. I picked up a copy and am eagerly looking forward to regaining my freedom.”
–Carmine Stoffo, Machine and Process Designer to pharmaceutical industry
“I am currently reading A Practical Guide to Red Hat® Linux® and am finally understanding the true power of the command line. I am new to Linux and your book is a treasure.”
–Juan Gonzalez
The Most Complete, Easy-to-Understand, and Useful Guide to Ubuntu Linux Desktops and Servers
Ubuntu Linux is a state-of-the-art operating system, and you need a book that’s just as advanced. Along with being the most comprehensive reference to installing, configuring, and working with Ubuntu, A Practical Guide to Ubuntu Linux® also provides extensive server coverage you won’t find in any other Ubuntu book.
Best-selling author Mark Sobell begins by walking you through every feature and technique you need to know, from installing Ubuntu–using the DVD included with the book–to working with GNOME, Samba, exim4, Apache, DNS, NIS, firestarter, and iptables. Sobell’s exceptionally clear explanations demystify everything from system security to Windows file/printer sharing.
Sobell presents full chapters on using Ubuntu from the command line and GUI; thorough system administration and security guidance; and up-to-the-minute, step-by-step instructions for setting up networks and every major type of Internet server. Along the way, you’ll learn both the “hows” and the “whys” of Ubuntu. Sobell knows every Linux nook and cranny: He’s taught hundreds of thousands of readers and never forgets what it’s like to be new to Linux. Whether you’re a user, administrator, or programmer, this book gives you all you need–and more.
Don’t settle for yesterday’s Unbuntu Linux book...get the ONLY book that meets today’s challenges and tomorrow’s!
This book delivers…
- Deeper coverage of the command line and the GNOME GUI, including GUI customization
- Coverage of important Ubuntu topics, such as sudo and the new Upstart init daemon
- More practical coverage of file sharing with Samba, NFS, and FTP
- More detailed, usable coverage of Internet server configuration, including Apache, exim4, and DNS/BIND
- More state-of-the-art security techniques, including firewall setup using firestarter and iptables, as well as a full chapter on OpenSSH and an appendix on security
- Deeper coverage of “meat-and-potatoes” system and network administration tasks–from managing users to CUPS printing, configuring LANs to building a kernel
- A more practical introduction to writing bash shell scripts
- Complete instructions on how to keep your Linux system up-to-date using aptitude, Synaptic, and the Software Sources window
- And much more...including a 500+ term glossary, five detailed appendixes, and a comprehensive index to help you find what you need fast
Print book includes DVD! Get the full version of the Ubuntu 7.10 (Gutsy Gibbon) release.
The Book
Whether you are an end user, a system administrator, or a little of both, this book explains with step-by-step examples how to get the most out of an Ubuntu Linux system. In 27 chapters, this book takes you from installing an Ubuntu system through understanding its inner workings to setting up secure servers that run on the system.
The Audience
This book is designed for a wide range of readers. It does not require you to have programming experience, although having some experience using a general-purpose computer, such as a Windows, Macintosh, UNIX, or another Linux system is certainly helpful. This book is appropriate for
- Students who are taking a class in which they use Linux
- Home users who want to set up and/or run Linux
- Professionals who use Linux at work
- System administrators who need an understanding of Linux and the tools that are available to them
- Computer science students who are studying the Linux operating system
- Programmers who need to understand the Linux programming environment
- Technical executives who want to get a grounding in Linux
Benefits
A Practical Guide to Ubuntu Linux® gives you a broad understanding of many facets of Linux, from installing Ubuntu Linux through using and customizing it. No matter what your background, this book provides the knowledge you need to get on with your work. You will come away from this book understanding how to use Linux, and this book will remain a valuable reference for years to come.
Overlap
If you read A Practical Guide to Linux® Commands, Editors, and Shell Programming, you will notice some overlap between that book and the one you are reading now. The first chapter, the chapters on the utilities and the filesystem, and the appendix on regular expressions are very similar in the two books, as are the three chapters on the Bourne Again Shell (bash). Chapters that appear in this book but do not appear in A Practical Guide to Linux® Commands, Editors, and Shell Programming include Chapters 2 and 3 (installation), Chapters 4 and 8 (Ubuntu Linux and the GUI), Chapter 10 (networking), all of the chapters in Part IV (system administration) and Part V (servers), and Appendix C (security).
Differences
While this book explains how to use Linux from a graphical interface and from the command line (a textual interface), A Practical Guide to Linux® Commands, Editors, and Shell Programming works exclusively with the command line. It includes full chapters on the vi and emacs editors, as well as chapters on the gawk pattern processing language and the sed stream editor. In addition, it has a command reference section that provides extensive examples of the use of more than 80 of the most important Linux utilities. You can use these utilities to solve problems without resorting to programming in C.
This Book Includes Ubuntu Gutsy Gibbon (7.10) on a Live/Install DVD
This book includes a live/install DVD that holds the Gutsy Gibbon (7.10) release of Ubuntu Linux. You can use this DVD to run a live Ubuntu session that displays the GNOME desktop without making any changes to your computer: Boot from the DVD, run an Ubuntu live session, and log off. Your system remains untouched: When you reboot, it is exactly as it was before you ran the Ubuntu live session. Alternatively, you can install Ubuntu from the live session. Chapter 2 helps you get ready to install Ubuntu. Chapter 3 provides step-by-step instructions for installing Ubuntu from this DVD. This book guides you through learning about, using, and administrating an Ubuntu Linux session.
DVD Features
The included DVD incorporates all the features of the live/install Desktop CD as well as the Alternate and Server CDs. It also includes all software packages supported by Ubuntu. You can use it to perform a graphical or textual (command line) installation of either a graphical or a textual Ubuntu system. If you do not have an Internet connection, you can use the DVD as a software repository and install any supported software packages from it.
Features of This Book
This book is designed and organized so you can get the most out of it in the shortest amount of time. You do not have to read this book straight through in page order. Instead, once you are comfortable using Linux, you can use this book as a reference: Look up a topic of interest in the table of contents or index and read about it. Or think of the book as a catalog of Linux topics: Flip through the pages until a topic catches your eye. The book includes many pointers to Web sites where you can get additional information: Consider the Internet an extension of this book.
A Practical Guide to Ubuntu Linux® is structured with the following features:
- Optional sections enable you to read the book at different levels, returning to more difficult material when you are ready to delve into it.
- Caution boxes highlight procedures that can easily go wrong, giving you guidance before you run into trouble.
- Tip boxes highlight ways you can save time by doing something differently or situations when it may be useful or just interesting to have additional information.
- Security boxes point out places where you can make a system more secure. The security appendix presents a quick background in system security issues.
- Concepts are illustrated by practical examples throughout the book.
- Chapter summaries review the important points covered in each chapter.
- Review exercises are included at the end of each chapter for readers who want to further hone their skills. Answers to even-numbered exercises are available at www.sobell.com.
- The glossary defines more than 500 common terms.
- The chapters that cover servers include JumpStart sections that get you off to a quick start using clients and setting up servers. Once a server is up and running, you can test and modify its configuration as explained in the rest of the chapter.
- This book provides resources for finding software on the Internet. It also explains how to download and install software using Synaptic, aptitude, the GNOME Add/Remove Applications window, and BitTorrent. It details controlling automatic updates using the Update Notifier and the Update Manager window.
- This book describes in detail many important GNU tools, including the GNOME desktop, the Nautilus File Browser, the parted and gparted partition editors, the gzip compression utility, and many command line utilities that come from the GNU project.
- Pointers throughout the text provide help in obtaining online documentation from many sources, including the local system, the Ubuntu Web site, and other locations on the Internet.
- Many useful URLs point to Web sites where you can obtain software, security programs and information, and more.
- The comprehensive index helps you locate topics quickly and easily.
Key Topics Covered in This Book
This book contains a lot of information. This section distills and summarizes its contents. In addition, “Details” (starting on page xli) describes what each chapter covers. Finally, the table of contents provides more detail.
Installation
The book:
- Describes how to download Ubuntu Linux ISO images from the Internet and burn the Ubuntu live/install Desktop CD, the DVD, or the Ubuntu Alternate or Server installation CD.
- Helps you plan the layout of the system’s hard disk. It includes a discussion of partitions, partition tables, and mount points, and assists you in using the ubiquity or gparted graphical partitioner or the Ubuntu textual partitioner to partition the hard disk.
- Explains how to set up a dual-boot system so you can install Ubuntu Linux on a Windows system and boot either operating system.
- Describes in detail how to install Ubuntu Linux from a live/install Desktop CD or the live/install DVD using the ubiquity graphical installer. It also explains how to use the textual installer found on the Alternate CD, the Server CD, and the DVD. The graphical installer is fast and easy to use. The textual installer gives you more options and works on systems with less RAM (system memory).
- Covers testing an Ubuntu CD/DVD for defects, setting boot command line parameters (boot options), and creating a RAID array.
- Covers the details of installing and customizing the X.org version of the X Window System either graphically using the Screen and Graphics Preferences window or manually with a text editor.
Working with Ubuntu Linux
The book:
- Introduces the GNOME desktop (GUI) and explains how to use desktop tools, including the Top and Bottom panels, panel objects, the Main menu, object context menus, the Workspace Switcher, the Nautilus File Browser, and the GNOME Terminal emulator.
- Explains how to use the Appearance Preferences window to add and modify themes to customize your desktop to please your senses and help you work more efficiently.
- Details how to set up 3D desktop visual effects that take advantage of Compiz Fusion.
- Covers the Bourne Again Shell (bash) in three chapters, including an entire chapter on shell programming that includes many sample shell scripts. These chapters provide clear explanations and extensive examples of how bash works both from the command line in day-to-day work and as a programming language to write shell scripts.
- Explains the textual (command line) interface and introduces more than 30 command line utilities.
- Presents a tutorial on the vim textual editor.
- Covers types of networks, network protocols, and network utilities.
- Explains hostnames, IP addresses, and subnets, and explores how to use host and dig to look up domain names and IP addresses on the Internet.
- Covers distributed computing and the client/server model.
- Explains how to use ACLs (Access Control Lists) to fine-tune user access permissions.
System Administration
The book:
- Explains how to use the Ubuntu graphical and textual (command line) tools to configure the display, DNS, NFS, Samba, Apache, a firewall, a network interface, and more. You can also use these tools to add users and manage local and remote printers.
- Goes into detail about using sudo to allow specific users to work with root privileges (become Superuser) and customizing the way sudo works by editing the sudoers configuration file. It also explains how you can unlock the root account if necessary.
- Describes how to use the following tools to download and install software to keep a system up-to-date and to install new software:
- The Software Sources window controls which Ubuntu and third-party software repositories Ubuntu downloads software packages from and whether Ubuntu downloads updates automatically. You can also use this window to cause Ubuntu to download and install security updates automatically.
- If you do not have an Internet connection, you can use the Software Sources window to set up the DVD included with this book as a software repository. You can then install any software packages that Ubuntu supports from this repository.
- Based on how you set up updates in the Software Sources window, the Update Notifier pops up on the desktop to let you know when software updates are available. Click the Update Notifier to open the Update Manager window, from which you can download and install updates.
- The Add/Remove Applications window provides an easy way to select, download, and install a wide range of software packages.
- Synaptic allows you to search for, install, and remove software packages. It gives you more ways to search for packages than does the Add/Remove Applications window.
- APT downloads and installs software packages from the Internet (or the included DVD), keeping a system up-to-date and resolving dependencies as it processes the packages. You can use APT from a graphical interface (Synaptic) or from several textual interfaces (e.g., aptitude and apt-get).
- BitTorrent is a good choice for distributing large amounts of data such as the Ubuntu installation DVD and CDs. The more people who use BitTorrent to download a file, the faster it works.
- Covers graphical system administration tools, including the many tools available from the GNOME Main menu.
- Explains system operation, including the boot process, init scripts, recovery (single-user) and multiuser modes, and steps to take if the system crashes.
- Describes how to use and program the new Upstart init daemon, which replaces the System V init daemon.
- Describes files, directories, and filesystems, including types of files and filesystems, fstab (the filesystem table), and automatically mounted filesystems, and explains how to fine-tune and check the integrity of filesystems.
- Covers backup utilities, including tar, cpio, dump, and restore.
- Describes compression/archive utilities, including gzip, bzip2, compress, and zip.
- Explains how to customize and build a Linux kernel.
Security
The book:
- Helps you manage basic system security issues using ssh (secure shell), vsftpd (secure FTP server), Apache (Web server), iptables (firewalls), and more.
- Covers using firestarter to share an Internet connection over a LAN, run a DHCP server, and set up a basic firewall to protect the system.
- Provides instructions on using iptables to share an Internet connection over a LAN and to build advanced firewalls.
- Describes how to set up a chroot jail to help protect a server system.
- Explains how to use TCP wrappers to control who can access a server.
Clients and Servers
The book:
- Explains how to set up and use the most popular Linux servers, providing a chapter on each: Apache, Samba, OpenSSH, exim4, DNS, NFS, FTP, firestarter and iptables, and NIS (all of which are supported by Ubuntu Linux).
- Describes how to set up a CUPS printer server.
- Describes how to set up and use a DHCP server either by itself or from firestarter.
Programming
The book:
- Provides a full chapter covering shell programming using bash, including many examples.
Details
Chapter 1 presents a brief history of Linux and explains some of the features that make it a cutting-edge operating system. The “Conventions Used in This Book” (page 17) section details the typefaces and terminology this book uses.
Part I
Part I, “Installing Ubuntu Linux,” discusses how to install Ubuntu Linux. Chapter 2 presents an overview of the process of installing Ubuntu Linux, including hardware requirements, downloading and burning a CD or DVD, and planning the layout of the hard disk. Chapter 3 is a step-by-step guide to installing Ubuntu Linux from a CD or DVD, using the graphical or textual installer. It also shows how to set up the X Window System and customize your desktop (GUI).
Part II
Part II, “Getting Started with Ubuntu Linux,” familiarizes you with Ubuntu Linux, covering logging in, the GUI, utilities, the filesystem, and the shell. Chapter 4 introduces desktop features, including the Top and Bottom panels and the Main menu; explains how to use the Nautilus File Browser to manage files, run programs, and connect to FTP and HTTP servers; covers finding documentation, dealing with login problems, and using the window manager; and presents some suggestions on where to find documentation, including manuals, tutorials, software notes, and HOWTOs. Chapter 5 introduces the shell command line interface, describes more than 30 useful utilities, and presents a tutorial on the vim text editor. Chapter 6 discusses the Linux hierarchical filesystem, covering files, filenames, pathnames, working with directories, access permissions, and hard and symbolic links. Chapter 7 introduces the Bourne Again Shell (bash) and discusses command line arguments and options, redirecting input to and output from commands, running programs in the background, and using the shell to generate and expand filenames.
TIP: Experienced users may want to skim Part IIIf you have used a UNIX or Linux system before, you may want to skim or skip some or all of the chapters in Part II. Part I has two sections that all readers should take a look at: “Conventions Used in This Book” (page 17), which explains the typographic and layout conventions used in this book, and “Where to Find Documentation” (page 124), which points out both local and remote sources of Linux and Ubuntu documentation.
Part III
Part III, “Digging into Ubuntu Linux,” goes into more detail about working with the system. Chapter 8 discusses the GUI (desktop) and includes a section on how to run a graphical program on a remote system and have the display appear locally. The section on GNOME describes several GNOME utilities, including the new Deskbar applet, and goes into more depth about the Nautilus File Browser. Chapter 9 extends the bash coverage from Chapter 7, explaining how to redirect error output, avoid overwriting files, and work with job control, processes, startup files, important shell builtin commands, parameters, shell variables, and aliases. Chapter 10 explains networks, network security, and the Internet and discusses types of networks, subnets, protocols, addresses, hostnames, and various network utilities. The section on distributed computing describes the client/server model and some of the servers you can use on a network. Chapter 11 goes into greater depth about shell programming using bash, with the discussion enhanced by extensive examples. Details of setting up and using clients and servers are reserved until Part V.
Part IV
Part IV covers system administration. Chapter 12 discusses core concepts such as the use of sudo, working with root privileges, system operation, chroot jails, TCP wrappers, general information about how to set up a server, DHCP, and PAM. Chapter 13 explains the Linux filesystem, going into detail about types of files, including special and device files; the use of fsck to verify the integrity of and repair filesystems; and the use of tune2fs to change filesystem parameters. Chapter 14 explains how to keep a system up-to-date by downloading software from the Internet and installing it, including examples of using APT programs such as aptitude, apt-get, and apt-cache. It also covers the dpkg software packaging system and the use of some dpkg utilities. Finally, it explains how to use BitTorrent from the command line to download files. Chapter 15 explains how to set up the CUPS printing system so you can print on both local and remote systems. Chapter 16 details customizing and building a Linux kernel. Chapter 17 covers additional administration tasks, including setting up user accounts, backing up files, scheduling automated tasks, tracking disk usage, and solving general problems. Chapter 18 explains how to set up a local area network (LAN), including both hardware (including wireless) and software configuration.
Part V
Part V goes into detail about setting up and running servers and connecting to them with clients. Where appropriate, these chapters include JumpStart sections that get you off to a quick start in using clients and setting up servers. The chapters in Part V cover the following clients/servers:
- OpenSSH: Set up an OpenSSH server and use ssh, scp, and sftp to communicate securely over the Internet.
- FTP: Set up a vsftpd secure FTP server and use any of several FTP clients to exchange files with the server.
- Mail: Configure exim4 and use Webmail, POP3, or IMAP to retrieve email; use SpamAssassin to combat spam.
- NIS: Set up NIS to facilitate system administration of a LAN.
- NFS: Share filesystems between systems on a network.
- Samba: Share filesystems and printers between Windows and Linux systems.
- DNS/BIND: Set up a domain nameserver to let other systems on the Internet know the names and IP addresses of local systems they may need to contact.
- firestarter and iptables: Share a single Internet connection between systems on a LAN, run a DHCP server, and set up a firewall to protect local systems.
- Apache: Set up an HTTP server that serves Web pages that browsers can display. This chapter includes many suggestions for increasing Apache security.
Part VI
Part VI includes appendixes on regular expressions, helpful Web sites, system security, and free software. This part also includes an extensive glossary with more than 500 entries plus a comprehensive index.
Supplements
The author’s home page (www.sobell.com) contains downloadable listings of the longer programs from this book as well as pointers to many interesting and useful Linux sites on the World Wide Web, a list of corrections to the book, answers to even-numbered exercises, and a solicitation for corrections, comments, and suggestions.
Preface xxxvi
Chapter 1: Welcome to Linux 1
The GNU—Linux Connection 2
The Linux 2.6 Kernel 5
The Heritage of Linux: UNIX 5
What Is So Good About Linux? 6
Overview of Linux 10
Additional Features of Linux 15
Conventions Used in This Book 17
Chapter Summary 20
Exercises 20
PART I: Installing Ubuntu Linux 21
Chapter 2: Installation Overview 23
The Live/Install Desktop CD/DVD 24
More Information 24
Planning the Installation 25
The Installation Process 36
Downloading and Burning a CD/DVD 37
Gathering Information About the System 41
Chapter Summary 42
Exercises 43
Advanced Exercises 43
Chapter 3: Step-by-Step Installation 45
Basic Installation from the Live/Install Desktop CD/DVD 46
Graphical Partitioners 53
Upgrading to a New Release 59
Installing KDE 60
Setting Up a Dual-Boot System 61
Advanced Installation 62
The X Window System 74
Chapter Summary 83
Exercises 83
Advanced Exercises 84
PART II: Getting Started with Ubuntu Linux 85
Chapter 4: Introduction to Ubuntu Linux 87
Curbing Your Power: root Privileges/sudo 88
A Tour of the Ubuntu Linux Desktop 89
Getting the Most out of the Desktop 105
Updating, Installing, and Removing Software Packages 119
Where to Find Documentation 124
More About Logging In 132
Working from the Command Line 136
Controlling Windows: Advanced Operations 139
Chapter Summary 142
Exercises 143
Advanced Exercises 144
Chapter 5: The Linux Utilities 145
Special Characters 146
Basic Utilities 147
Working with Files 149
(Pipe): Communicates Between Processes 156
Four More Utilities 157
Compressing and Archiving Files 159
Locating Commands 164
Obtaining User and System Information 166
Communicating with Other Users 170
Email 171
Tutorial: Creating and Editing a File with vim 172
Chapter Summary 179
Exercises 181
Advanced Exercises 182
Chapter 6: The Linux Filesystem 183
The Hierarchical Filesystem 184
Directory Files and Ordinary Files 184
Pathnames 189
Directory Commands 191
Working with Directories 196
Access Permissions 199
ACLs: Access Control Lists 203
Links 209
Chapter Summary 214
Exercises 216
Advanced Exercises 218
Chapter 7: The Shell 219
The Command Line 220
Standard Input and Standard Output 226
Running a Program in the Background 237
Filename Generation/Pathname Expansion 239
Builtins 243
Chapter Summary 244
Exercises 245
Advanced Exercises 247
PART III: Digging into Ubuntu Linux 249
Chapter 8: Linux GUIs: X and GNOME 251
X Window System 252
The Nautilus File Browser Window 260
GNOME Utilities 266
Chapter Summary 271
Exercises 272
Advanced Exercises 272
Chapter 9: The Bourne Again Shell 275
Background 276
Shell Basics 277
Parameters and Variables 295
Special Characters 309
Processes 310
History 312
Aliases 328
Functions 331
Controlling bash Features and Options 334
Processing the Command Line 338
Chapter Summary 347
Exercises 349
Advanced Exercises 351
Chapter 10: Networking and the Internet 353
Types of Networks and How They Work 355
Communicate Over a Network 370
Network Utilities 372
Distributed Computing 379
Usenet 388
WWW: World Wide Web 390
Chapter Summary 392
Exercises 393
Advanced Exercises 394
Chapter 11: Programming the Bourne Again Shell 395
Control Structures 396
File Descriptors 429
Parameters and Variables 432
Builtin Commands 444
Expressions 458
Shell Programs 466
Chapter Summary 476
Exercises 478
Advanced Exercises 480
PART IV: System Administration 483
Chapter 12: System Administration: Core Concepts 485
Running Commands with root Privileges 487
The Upstart Event-Based init Daemon 500
System Operation 510
Avoiding a Trojan Horse 520
Getting Help 522
Textual System Administration Utilities 522
Setting Up a Server 527
nsswitch.conf: Which Service to Look at First 542
PAM 545
Chapter Summary 550
Exercises 551
Advanced Exercises 551
Chapter 13: Files, Directories, and Filesystems 553
Important Files and Directories 554
File Types 566
Filesystems 570
Chapter Summary 580
Exercises 580
Advanced Exercises 581
Chapter 14: Downloading and Installing Software 583
JumpStart: Installing and Removing Packages Using aptitude 585
Finding the Package That Holds a File You Need 587
APT: Keeps the System Up-to-Date 588
dpkg: The Debian Package Management System 598
BitTorrent 604
Installing Non-dpkg Software 607
wget: Downloads Files Noninteractively 609
Chapter Summary 610
Exercises 610
Advanced Exercises 610
Chapter 15: Printing with CUPS 611
Introduction 612
JumpStart I: Configuring a Local Printer 614
system-config-printer: Configuring a Printer 614
JumpStart II: Configuring a Remote Printer Using the CUPS Web Interface 618
Traditional UNIX Printing 622
Configuring Printers 624
Printing from Windows 630
Printing to Windows 632
Chapter Summary 633
Exercises 633
Advanced Exercises 633
Chapter 16: Building a Linux Kernel 635
Prerequisites 636
Downloading the Kernel Source Code 637
Read the Documentation 638
Configuring and Compiling the Linux Kernel 639
Installing the Kernel, Modules, and Associated Files 646
Rebooting 647
grub: The Linux Boot Loader 647
dmesg: Displays Kernel Messages 654
Chapter Summary 655
Exercises 656
Advanced Exercises 656
Chapter 17: Administration Tasks 657
Configuring User and Group Accounts 658
Backing Up Files 662
Scheduling Tasks 668
System Reports 671
parted: Reports on and Partitions a Hard Disk 673
Keeping Users Informed 677
Creating Problems 678
Solving Problems 679
Chapter Summary 690
Exercises 690
Advanced Exercises 691
Chapter 18: Configuring a LAN 693
Setting Up the Hardware 694
Configuring the Systems 697
Setting Up Servers 702
More Information 703
Chapter Summary 703
Exercises 704
Advanced Exercises 704
PART V: Using Clients and Setting Up Servers 705
Chapter 19: OpenSSH: Secure Network Communication 707
Introduction 708
About OpenSSH 708
OpenSSH Clients 711
sshd: OpenSSH Server 720
Troubleshooting 724
Tunneling/Port Forwarding 725
Chapter Summary 727
Exercises 728
Advanced Exercises 728
Chapter 20: FTP: Transferring Files Across a Network 729
Introduction 730
More Information 731
FTP Client 731
FTP Server (vsftpd) 740
Chapter Summary 753
Exercises 753
Advanced Exercises 754
Chapter 21: exim4: Setting Up Mail Servers, Clients, and More 755
Introduction to exim4 756
JumpStart I: Configuring exim4 to Use a Smarthost 758
JumpStart II: Configuring exim4 to Send and Receive Email 760
How exim4 Works 761
Configuring exim4 765
SpamAssassin 768
Additional Email Tools 772
Authenticated Relaying 777
Alternatives to exim4 779
Chapter Summary 779
Exercises 780
Advanced Exercises 780
Chapter 22: NIS: Network Information Service 781
Introduction to NIS 782
How NIS Works 782
Setting Up an NIS Client 784
Setting Up an NIS Server 790
Chapter Summary 798
Exercises 798
Advanced Exercises 798
Chapter 23: NFS: Sharing Filesystems 799
Introduction 800
More Information 802
Setting Up an NFS Client 802
Setting Up an NFS Server 808
automount: Mounts Directory Hierarchies on Demand 818
Chapter Summary 821
Exercises 822
Advanced Exercises 822
Chapter 24: Samba: Linux and Windows File and Printer Sharing 823
Introduction 824
About Samba 825
JumpStart: Configuring a Samba Server Using shares-admin 826
swat: Configures a Samba Server 828
smb.conf: Manually Configuring a Samba Server 832
Accessing Linux Shares from Windows 838
Accessing Windows Shares from Linux 839
Troubleshooting 841
Chapter Summary 844
Exercises 844
Advanced Exercises 844
Chapter 25: DNS/BIND: Tracking Domain Names and Addresses 845
Introduction to DNS 846
About DNS 857
JumpStart: Setting Up a DNS Cache 858
Setting Up BIND 860
Troubleshooting 872
A Full-Functioned Nameserver 873
A Slave Server 877
A Split Horizon Server 878
Chapter Summary 883
Exercises 883
Advanced Exercises 884
Chapter 26: firestarter and iptables: Setting Up a Firewall 885
About firestarter 886
JumpStart: Building a Firewall Using the firestarter Firewall Wizard 888
firestarter: Maintains a Firewall 890
How iptables Works 896
About iptables 899
Anatomy of an iptables Command 900
Building a Set of Rules 901
Copying Rules to and from the Kernel 907
Sharing an Internet Connection Using NAT 908
Chapter Summary 912
Exercises 913
Advanced Exercises 913
Chapter 27: Apache: Setting Up a Web Server 915
Introduction 916
About Apache 917
JumpStart: Getting Apache Up and Running 919
Configuring Apache 921
Configuration Directives 925
The Ubuntu apache2.conf File 948
The Ubuntu default Configuration File 950
Redirects 951
Content Negotiation 951
Server-Generated Directory Listings (Indexing) 953
Virtual Hosts 953
Troubleshooting 956
Modules 957
webalizer: Analyzes Web Traffic 964
MRTG: Monitors Traffic Loads 964
Error Codes 964
Chapter Summary 965
Exercises 966
Advanced Exercises 966
PART VI: Appendixes 969
Appendix A: Regular Expressions 971
Characters 972
Delimiters 972
Simple Strings 972
Special Characters 972
Rules 975
Bracketing Expressions 976
The Replacement String 976
Extended Regular Expressions 977
Appendix Summary 979
Appendix B: Help 981
Solving a Problem 982
Finding Linux-Related Information 983
Specifying a Terminal 988
Appendix C: Security 991
Encryption 992
File Security 997
Email Security 997
Network Security 998
Host Security 1001
Security Resources 1006
Appendix Summary 1009
Appendix D: The Free Software Definition 1011
Appendix E: The Linux 2.6 Kernel 1015
Native Posix Thread Library (NPTL) 1016
IPSecurity (IPSec) 1016
Asynchronous I/O (AIO) 1016
O(1) Scheduler 1017
OProfile 1017
kksymoops 1017
Reverse Map Virtual Memory (rmap VM) 1017
HugeTLBFS: Translation Look-Aside Buffer Filesystem 1018
remap_file_pages 1018
2.6 Network Stack Features (IGMPv3, IPv6, and Others) 1018
Internet Protocol Virtual Server (IPVS) 1019
Access Control Lists (ACLs) 1019
4GB-4GB Memory Split: Physical Address Extension (PAE) 1019
Scheduler Support for HyperThreaded CPUs 1019
Block I/O (BIO) Block Layer 1019
Support for Filesystems Larger Than 2 Terabytes 1020
New I/O Elevators 1020
Interactive Scheduler Response Tuning 1020
Glossary 1021
Index 1071
Publisher: Pearson Education
Distributor: Pearson Education
Publication Date: 12-18-2007
Pages: 1200
Measurements: 9.25in X 7.4in X 2.114in X 1758gr