Home > Store

Practical Guide to Ubuntu Linux, A

Register your product to gain access to bonus material or receive a coupon.

Practical Guide to Ubuntu Linux, A

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2008
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-13-236039-X
  • ISBN-13: 978-0-13-236039-5

A new edition of this title is available, ISBN-10: 0137003889 ISBN-13: 9780137003884

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 Ubuntu 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.



Author's Site

Please visit the author's website at www.sobell.com.

Sample Content

Table of Contents

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


Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020