Home > Store

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, 8th Edition

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

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, 8th Edition


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


  • Copyright 2013
  • Edition: 8th
  • Book
  • ISBN-10: 0-672-33624-3
  • ISBN-13: 978-0-672-33624-9

Ubuntu Unleashed 2013 Edition is filled with unique and advanced information for everyone who wants to make the most of the Ubuntu Linux operating system. This new edition has been thoroughly revised and updated by a long-time Ubuntu community leader to reflect the exciting new Ubuntu 12.10 (“Quantal Quetzal”) and the forthcoming Ubuntu 13.04.

Former Ubuntu Forum administrator Matthew Helmke covers all you need to know about Ubuntu 12.10/13.04 installation, configuration, productivity, multimedia, development, system administration, server operations, networking, virtualization, security, DevOps, and more—including intermediate-to-advanced techniques you won’t find in any other book.

Helmke presents up-to-the-minute introductions to Ubuntu’s key productivity and Web development tools, programming languages, hardware support, and more. You’ll find new or improved coverage of navigation via Unity Dash, wireless networking, VPNs, software repositories, new NoSQL database options, virtualization and cloud services, new programming languages and development tools, monitoring, troubleshooting, and more.

  • Configure and customize the Unity desktop and make the most of the Dash
  • Get started with multimedia and productivity applications, including LibreOffice
  • Manage Linux services, users, and software packages
  • Administer and run Ubuntu from the command line (with added coverage of stdin, stdout, sdterr, redirection, and file comparison)
  • Automate tasks and use shell scripting
  • Provide secure remote access and configure a secure VPN
  • Manage kernels and modules
  • Administer file, print, email, proxy, LDAP, and HTTP servers (Apache or alternatives)
  • Learn about new options for managing large numbers of servers
  • Work with databases (both SQL and the newest NoSQL alternatives)
  • Get started with virtualization
  • Build a private cloud with Juju and Charms
  • Learn the basics about popular programming languages including Python, PHP, Perl, and new alternatives such as Go and Rust



Download the extra chapter from the last edition here.

Sample Content

Online Sample Chapter

Ubuntu Command-Line Quickstart

Sample Pages

Download the sample pages (includes Chapter 9 and Index)

Table of Contents

Introduction 1
Licensing     2
Who This Book Is For     3
  Those Wanting to Become Intermediate or Advanced Users     3
  Sysadmins, Programmers, and DevOps     4
What This Book Contains     5
Conventions Used in This Book     5
Part I Installation and Configuration
1  Installing Ubuntu and Post-Installation Configuration     7
Before You Begin the Installation     7
  Researching Your Hardware Specifications     8
  Installation Options     8
  Planning Partition Strategies     10
  The Boot Loader     10
  Installing from DVD or USB Drive     11
Step-by-Step Installation     11
  Installing     12
  First Update     16  
  Wubi: The Easy Installer for Windows     16
Shutting Down     18
Finding Programs and Files     19
Software Updater     19
The sudo Command     22
Configuring Software Repositories     23
System Settings     26
  Detecting and Configuring a Printer     26
  Configuring Power Management in Ubuntu     27
  Setting the Time and Date     27
Configuring Wireless Networks     29
Troubleshooting Post-Installation Configuration Problems     31
References     32
Part II Desktop Ubuntu
2  Working with Unity     33
Foundations and the X Server     33
  Basic X Concepts     34
  Using X     35
  Elements of the xorg.conf File     36
  Starting X     41
  Using a Display Manager     41
  Changing Window Managers     42
Using Unity, a Primer     42
  The Desktop     43
  Customizing and Configuring Unity     48
Power Shortcuts     49
References     50
3  On the Internet     51
Getting Started with Firefox     52
Checking Out Google Chrome and Chromium     53
Choosing an Email Client     55
  Mozilla Thunderbird     56
  Evolution     56
  Other Mail Clients     57
RSS Readers     58
  Firefox     58
  Liferea     58
Instant Messaging and Video Conferencing with Empathy     59
Internet Relay Chat     60
Usenet Newsgroups     62
Ubuntu One Cloud Storage     64
References     64
4  Productivity Applications     65
Introducing LibreOffice     67
Other Office Suites for Ubuntu     69
  Working with GNOME Office     69  
  Working with KOffice     70
Other Useful Productivity Software     71
  Working with PDF     71
  Working with XML and DocBook     71
  Working with LaTeX     73
Productivity Applications Written for Microsoft Windows     73
References     74
5  Multimedia Applications     75
Sound and Music     75
  Sound Cards     76
  Adjusting Volume     77
  Sound Formats     78
  Listening to Music     79
  Buying Music in the Ubuntu One Music Store     81
Graphics Manipulation     83
  The GNU Image Manipulation Program     83
  Using Scanners in Ubuntu     85
  Working with Graphics Formats     85
  Capturing Screen Images     87
Using Digital Cameras with Ubuntu     88
  Handheld Digital Cameras     88
  Using Shotwell Photo Manager     88
Burning CDs and DVDs in Ubuntu     89
  Creating CDs and DVDs with Brasero     89
  Creating CDs from the Command Line     89
  Creating DVDs from the Command Line     91
Viewing Video     94
  TV and Video Hardware     94
  Video Formats     95
  Viewing Video in Linux     96
  Personal Video Recorders     97
  Video Editing     97
References     98
6  Other Ubuntu Interfaces     99
Desktop Environment     100
KDE and Kubuntu     101
Xfce and Xubuntu     102
  LXDE and Lubuntu     103
GNOME3 and Gnobuntu     104
References     105
7  Games     107
Ubuntu Gaming     107
  Installing Proprietary Video Drivers     108
Installing Games in Ubuntu     109
  Warsow     110
  Scorched 3D     110
  Frozen Bubble     111
  SuperTux     112
  Battle for Wesnoth     112
  Frets on Fire     114
  FlightGear     114
  Speed Dreams     114
  Games for Kids     114
  Commercial Games     115
Playing Windows Games     116
References     116
Part III  System Administration
8  Managing Software     119
Ubuntu Software Center     119
Using Synaptic for Software Management     120
Staying Up-to-Date     122
Working on the Command Line     123
  Day-to-Day Usage     124
  Finding Software     127
Compiling Software from Source     128
  Compiling from a Tarball     128
  Compiling from Source from the Ubuntu Repositories     129
Configuration Management     130
  Dotdee     130
  OneConf     131
References     131
9  Command-Line Quickstart     133
What Is the Command Line?     134
Accessing the Command Line     135
  Text-Based Console Login     136
  Logging Out     137
  Logging In and Out from a Remote Computer     137
User Accounts     138
Reading Documentation     140
  Using Man Pages      140
  Using apropros     140
  Using whereis     141
Understanding the Linux File System Hierarchy     141
  Essential Commands in /bin and /sbin     142
  Configuration Files in /etc     143
  User Directories: /home     143
  Using the Contents of the /proc Directory to Interact  with the Kernel     144  
  Working with Shared Data in the /usr Directory     145
  Temporary File Storage in the /tmp Directory     146
  Accessing Variable Data Files in the /var Directory     146
Navigating the Linux File System     146
  Listing the Contents of a Directory with ls     146
  Changing Directories with cd     148
  Finding Your Current Directory with pwd     149
Working with Permissions     149
  Assigning Permissions     150
  Directory Permissions     151
  Altering File Permissions with chmod     152
  File Permissions with chgrp     153
  Changing File Permissions with chown     153
  Understanding Set User ID and Set Group ID Permissions     153
Working with Files     155
  Creating a File with touch     155
  Creating a Directory with mkdir     155
  Deleting a Directory with rmdir     156
  Deleting a File or Directory with rm     157
  Moving or Renaming a File with mv     157
  Copying a File with cp     158
  Displaying the Contents of a File with cat     159
  Displaying the Contents of a File with less     159
  Using Wildcards and Regular Expressions     159
Working as Root     160
  Understanding and Fixing sudo     160
  Creating Users     164
  Deleting Users     164
  Shutting Down the System     165
  Rebooting the System     166
Commonly Used Commands and Programs     166
References     167
10  Command-Line Master Class     169
Why Use the Command Line?     170
Using Basic Commands     171
  Printing the Contents of a File with cat      172
  Changing Directories with cd     173
  Changing File Access Permissions with chmod     175
  Copying Files with cp     175
  Printing Disk Usage with du     176
  Finding Files by Searching with find     177
  Searches for a String in Input with grep     179
  Paging Through Output with less     180
  Creating Links Between Files with ln     182
  Finding Files from an Index with locate     184
  Listing Files in the Current Directory with ls     184
  Reading Manual Pages with man     186
  Making Directories with mkdir     187
  Moving Files with mv     187
  Listing Processes with ps     188
  Deleting Files and Directories with rm     188
  Printing the Last Lines of a File with tail     189
  Printing Resource Usage with top     189
  Printing the Location of a Command with which     191
Redirecting Output and Input     191
stdin, stdout, sdterr, and Redirection     193
Comparing Files     194
  Finding Differences in Files with diff     194
  Finding Similarities in Files with comm.     194
Combining Commands     195
Using Environment Variables     197
Using Common Text Editors     200
  Working with nano     201
  Working with vi     202
  Working with emacs     203
Working with Compressed Files     204
Using Multiple Terminals with byobu     205
References     207
11  Managing Users     209
User Accounts     209
  The Super User/Root User     210
  User IDs and Group IDs     212
  File Permissions     212
Managing Groups     213
  Group Listing     213
  Group Management Tools     214
Managing Users     216
  User Management Tools     216
  Adding New Users     218
  Monitoring User Activity on the System     222
Managing Passwords     222
  System Password Policy     222
  The Password File     223
  Shadow Passwords     224
  Managing Password Security for Users     226
  Changing Passwords in a Batch     227
Granting System Administrator Privileges to Regular Users     227
  Temporarily Changing User Identity with the su Command      227
  Granting Root Privileges on Occasion: The sudo Command     229
Disk Quotas     232
  Implementing Quotas     233
  Manually Configuring Quotas     233
Related Ubuntu Commands     234
References     235
12  Automating Tasks and Shell Scripting     237
Scheduling Tasks     237
  Using at and batch to Schedule Tasks for Later     237
  Using cron to Run Jobs Repeatedly     240
Basic Shell Control     242
  The Shell Command Line     243
  Shell Pattern-Matching Support     245
  Redirecting Input and Output     246
  Piping Data     247
  Background Processing     247
Writing and Executing a Shell Script     248
  Running the New Shell Program     249
  Storing Shell Scripts for System-wide Access     250
  Interpreting Shell Scripts Through Specific Shells     250
  Using Variables in Shell Scripts     252
  Assigning a Value to a Variable     252
  Accessing Variable Values     253
  Positional Parameters     253
  A Simple Example of a Positional Parameter     253
  Using Positional Parameters to Access and Retrieve Variables from the Command Line     254
  Using a Simple Script to Automate Tasks     255
  Built-In Variables     257
  Special Characters     257
  Using Double Quotes to Resolve Variables in Strings with Embedded Spaces     258
  Using Single Quotes to Maintain Unexpanded Variables     259
  Using the Backslash as an Escape Character     260
  Using the Backtick to Replace a String with Output     260
  Comparison of Expressions in pdksh and bash     261
  Comparing Expressions with tcsh     266
  The for Statement     270
  The while Statement     271
  The until Statement     273
  The repeat Statement (tcsh)     274
  The select Statement (pdksh)     274
  The shift Statement     275
  The if Statement     275
  The case Statement     276
  The break and exit Statements     278
  Using Functions in Shell Scripts     279
References     280
13  The Boot Process     281
Running Services at Boot     281
Beginning the Boot Loading Process     282
  Loading the Linux Kernel     283
  System Services and Runlevels     284
  Runlevel Definitions     284
  Booting into the Default Runlevel     285
  Understanding init Scripts and the Final Stage of Initialization     285
  Controlling Services at Boot with Administrative Tools     286
  Changing Runlevels     286
  Troubleshooting Runlevel Problems     287
Starting and Stopping Services Manually     288
Using Upstart     289
References     290
14  System-Monitoring Tools     291
Console-Based Monitoring     291
  Using the kill Command to Control Processes     293
  Using Priority Scheduling and Control     294
  Displaying Free and Used Memory with free     296
  Disk Space     297
  Disk Quotas     298
Graphical Process and System Management Tools     298
  System Monitor     298
  Conky     300
  Other     305
KDE Process- and System-Monitoring Tools     305
Enterprise Server Monitoring     305
  Landscape     306
  Other     306
References     306
15  Backing Up     307
Choosing a Backup Strategy     307
  Why Data Loss Occurs     308
  Assessing Your Backup Needs and Resources     309
  Evaluating Backup Strategies     311
  Making the Choice     314
Choosing Backup Hardware and Media     314
  Removable Storage Media     314
  CD-RW and DVD+RW/-RW Drives     315
  Network Storage     315
  Tape Drive Backup     315
  Cloud Storage     316
Using Backup Software     316
  tar: The Most Basic Backup Tool     317
  The GNOME File Roller     319
  The KDE ark Archiving Tool     320
  Déjà Dup     320
  Back In Time     322
  Unison     324
  Using the Amanda Backup Application     324
  Alternative Backup Software     325
Copying Files     326
  Copying Files Using tar     326
  Compressing, Encrypting, and Sending tar Streams     327
  Copying Files Using cp     327
  Copying Files Using mc     328
  Using rsync     328
Version Control for Configuration Files     330
  System Rescue     332
  The Ubuntu Rescue Disc     333
  Restoring the GRUB2 Boot Loader     333
  Saving Files from a Nonbooting Hard Drive     333
References     334
16  Networking     335
Laying the Foundation: The localhost Interface     336
  Checking for the Availability of the Loopback Interface     336
  Configuring the Loopback Interface Manually     336
Checking Connections with ping, traceroute, and mtr     338
Networking with TCP/IP     340
  TCP/IP Addressing     341
  Using IP Masquerading in Ubuntu     343
  Ports     344
IPv6 Basics     344
Network Organization     347
  Subnetting     347
  Subnet Masks     348
  Broadcast, Unicast, and Multicast Addressing     348
Hardware Devices for Networking     349
  Network Interface Cards     349
  Network Cable     351
  Hubs and Switches     352
  Routers and Bridges     353
  Initializing New Network Hardware     353
Using Network Configuration Tools     355
  Command-Line Network Interface Configuration     356
  Network Configuration Files     360
  Using Graphical Configuration Tools     363
Dynamic Host Configuration Protocol     365
  How DHCP Works     365
  Activating DHCP at Installation and Boot Time     366
  DHCP Software Installation and Configuration     367
  Using DHCP to Configure Network Hosts     369
  Other Uses for DHCP     371
Wireless Networking     371
  Support for Wireless Networking in Ubuntu     371
  Advantages of Wireless Networking     373
  Choosing from Among Available Wireless Protocols     373
Beyond the Network and onto the Internet     374
Common Configuration Information     374
Configuring Digital Subscriber Line Access     376
  Understanding PPP over Ethernet     376
  Configuring a PPPoE Connection Manually     377
Configuring Dial-Up Internet Access     378
Troubleshooting Connection Problems     379
References     380
17  Remote Access with SSH and Telnet     381
Setting Up a Telnet Server     381
Telnet Versus SSH     383
Setting Up an SSH Server     383
SSH Tools     383
  Using scp to Copy Individual Files Between Machines     384
  Using sftp to Copy Many Files Between Machines     385
  Using ssh-keygen to Enable Key-Based Logins     385
Virtual Network Computing     387
References     389
18  Securing Your Machines     391
Understanding Computer Attacks    391
Assessing Your Vulnerability     393
Protecting Your Machine     394
  Securing a Wireless Network     395
  Passwords and Physical Security     395
  Configuring and Using Tripwire     396
  Devices     397
Viruses     397
Configuring Your Firewall     398
AppArmor     401
Forming a Disaster Recovery Plan     403
References     404
19  Performance Tuning     405
Hard Disk     405
  Using the BIOS and Kernel to Tune the Disk Drives     406
  The hdparm Command     407
  File System Tuning     408
  The tune2fs Command     408
  The e2fsck Command     409
  The badblocks Command     409
  Disabling File Access Time     409
Kernel     410
Apache     411
MySQL     412
  Measuring Key Buffer Usage     412
  Using the Query Cache     414
  Miscellaneous Tweaks     415
  Query Optimization     416
References     416
20  Kernel and Module Management     417
The Linux Kernel     418
  The Linux Source Tree     419
  Types of Kernels     421
Managing Modules     422
When to Recompile     424
Kernel Versions     425
Obtaining the Kernel Sources     426
Patching the Kernel     426
Compiling the Kernel     428
  Using xconfig to Configure the Kernel     431
  Creating an Initial RAM Disk Image     434
When Something Goes Wrong     435
  Errors During Compile     435
  Runtime Errors, Boot Loader Problems, and Kernel Oops     436
References     436
Part IV  Ubuntu as a Server
21  Sharing Files and Printers     439
Using the Network File System     440
  Installing and Starting or Stopping NFS     440
  NFS Server Configuration     440
  NFS Client Configuration     442
Putting Samba to Work     443
  Manually Configuring Samba with /etc/samba/smb.conf      444
  Testing Samba with the testparm Command     447
  Starting, Stopping, and Restarting the smbd Daemon     448
  Mounting Samba Shares     449
  Configuring Samba Using SWAT     450
Network and Remote Printing with Ubuntu     453
  Creating Network Printers     454
  Using the Common UNIX Printing System GUI     456
  Avoiding Printer Support Problems     458
References     460
22  Apache Web Server Management     461
About the Apache Web Server     461
Installing the Apache Server     462
  Installing from the Ubuntu Repositories     463
  Building the Source Yourself     464
Starting and Stopping Apache     467
  Starting the Apache Server Manually     467
  Using /etc/init.d/apache2     468
Runtime Server Configuration Settings     469
  Runtime Configuration Directives     470
  Editing apache2.conf      470
  Apache Multiprocessing Modules     473
  Using .htaccess Configuration Files     473
File System Authentication and Access Control     475
  Restricting Access with allow and deny     476
  Authentication     477
  Final Words on Access Control     479
Apache Modules     480
  mod_access     481
  mod_alias     481
  mod_asis     481
  mod_auth     482
  mod_auth_anon     482
  mod_auth_dbm     482
  mod_auth_digest     482
  mod_autoindex     483
  mod_cgi     483
  mod_dir and mod_env     483
  mod_expires     483
  mod_headers     483
  mod_include      484
  mod_info and mod_log_config     484
  mod_mime and mod_mime_magic     484
  mod_negotiation     484
  mod_proxy     484
  mod_rewrite      484
  mod_setenvif     485
  mod_speling     485
  mod_status      485
  mod_ssl      485
  mod_unique_id     485
  mod_userdir     485
  mod_usertrack     485
  mod_vhost_alias     485
Virtual Hosting     486
  Address-Based Virtual Hosts     486
  Name-Based Virtual Hosts     486
Logging     488
References     490
23  Other HTTP Servers     491
Nginx     491
Lighttpd     493
Yaws     494
Cherokee     494
Jetty     495
Thttpd     . 495
Apache Tomcat     496
References     496
24  Remote File Serving with FTP     497
Choosing an FTP Server     497
  Choosing an Authenticated or Anonymous Server     498
  Ubuntu FTP Server Packages     498
  Other FTP Servers     498
Installing FTP Software     499
The FTP User     500
Configuring the Very Secure FTP Server     502
  Controlling Anonymous Access     503
  Other vsftpd Server Configuration Files     504
Using the ftphosts File to Allow or Deny FTP Server Connection     505
References     506
25  Handling Email     507
How Email Is Sent and Received     507
  The Mail Transport Agent      508
  Choosing an MTA     510
  The Mail Delivery Agent     510
  The Mail User Agent     511
Basic Postfix Configuration and Operation     512
  Configuring Masquerading     514
  Using Smart Hosts     515
  Setting Message Delivery Intervals     515
  Mail Relaying     516
  Forwarding Email with Aliases     516
Using Fetchmail to Retrieve Mail     517
  Installing Fetchmail     517
  Configuring Fetchmail     517
Choosing a Mail Delivery Agent      521
  Procmail     521
  Spamassassin     521
  Squirrelmail     522
  Virus Scanners     522
  Autoresponders     522
Alternatives to Microsoft Exchange Server     522
  Microsoft Exchange Server/Outlook Client     523
  CommuniGate Pro     523
  Oracle Beehive     524
  Bynari     524
  Open-Xchange     524
  Phpgroupware     524
  PHProjekt     524
  Horde     524
References     525
26  Proxying, Reverse Proxying, and Virtual Private Networks (VPN)     527
What Is a Proxy Server?     527
Installing Squid     528
Configuring Clients     528
Access Control Lists     529
Specifying Client IP Addresses     533
Sample Configurations     534
Virtual Private Networks (VPN)     536
  Setting Up a VPN Client     537
  Setting Up a VPN Server     539
References     541
27  Administering Relational Database Services     543
A Brief Review of Database Basics     544
  How Relational Databases Work     545
  Understanding SQL Basics     547
  Creating Tables     548
  Inserting Data into Tables     549
  Retrieving Data from a Database     550
Choosing a Database: MySQL Versus PostgreSQL     552
  Speed     552
  Data Locking     552
  ACID Compliance in Transaction Processing to Protect Data Integrity     553
  SQL Subqueries     554
  Procedural Languages and Triggers     554
Configuring MySQL     554
  Setting a Password for the MySQL Root User     555
  Creating a Database in MySQL     556
Configuring PostgreSQL     558
  Initializing the Data Directory in PostgreSQL     558
  Creating a Database in PostgreSQL     559
  Creating Database Users in PostgreSQL     559
  Deleting Database Users in PostgreSQL     560
  Granting and Revoking Privileges in PostgreSQL     561
Database Clients     561
  SSH Access to a Database     562
  Local GUI Client Access to a Database     563  
  Web Access to a Database     563
  The MySQL Command-Line Client     564
  The PostgreSQL Command-Line Client     566
  Graphical Clients     566
References     567
28  NoSQL Databases     569
Key/Value Stores     571
  Berkeley DB     572
  Cassandra     572
  Memcached and MemcacheDB     573
  Redis     573
  Riak     574
Document Stores     574
  CouchDB     575
  MongoDB     575
  BaseX     576
Wide Column Stores     576
  BigTable     577
  HBase     577
Graph Stores     577
  Neo4j     578
  OrientDB     578
  HyperGraphDB     578
  FlockDB     578
References     579
29  Lightweight Directory Access Protocol (LDAP)     581
Configuring the Server     582
  Creating Your Schema     582
  Populating Your Directory     584
Configuring Clients     586
  Evolution     586
  Thunderbird     587
Administration     587
References     588
30  Linux Terminal Server Project (LTSP)     589
Requirements     590
Installation     593
Using LTSP     594
References     595
31  Virtualization on Ubuntu     597
KVM     599
VirtualBox     603
VMware     605
Xen     605
References     605
32  Ubuntu in the Cloud     607
Why a Cloud?     608
  Software as a Service (SaaS)     609
  Platform as a Service (PaaS).     609
  Infrastructure as a Service (IaaS)     609
  Metal as a Service (MaaS)     609
  Before You Do Anything     610
Ubuntu Cloud and Eucalyptus     610
  Deploy/Install Basics: Public or Private?     612
  Public     612
  Private     613
  A euca2ools Primer     616
Ubuntu Cloud and OpenStack     618
  Compute Infrastructure (Nova)     618
  Storage Infrastructure (Swift)     619
  Imaging Service (Glance)     619
  Installation     619
  Creating an Image     629
  Instance Management     632
  Storage Management     633
  Network Management     633
  An OpenStack Commands Primer     634
  Learning More     634
Juju     634
  Getting Started     635
  Charms     638
Landscape     640
References     640
33  Managing Sets of Servers     641
Juju    641
Puppet     642
Chef    642
CFEngine    643
Landscape    643
References     643
Part V Programming Linux
34  Opportunistic Development     645
Version Control Systems     646
  Managing Software Projects with Subversion     646
  Managing Software Projects with Bazaar     647
  Managing Software Projects with Mercurial     648
  Managing Software Projects with Git     649
Introduction to Opportunistic Development     650
Launchpad     651
Quickly     653
Ground Control     657
Bikeshed and Other Tools     661
References     663
35  Helping with Ubuntu Development     665
Introduction to Ubuntu Development     666
Setting Up Your Development System     667
  Install Basic Packages and Configure    667
  Create a Launchpad Account     668
  Set Up Your Environment to Work with Launchpad     668
Fixing Bugs and Packaging     670
Finding Bugs to Fix with Harvest     673
Masters of the Universe     673
References     673
36  Helping with Ubuntu Testing and QA     675
Community Teams     675
  Ubuntu Testing Team     676
  QA Team     676
Bug Squad     677
Test Drive     677
References     680
37  Using Perl     681
Using Perl with Linux     . 681
  Perl Versions     682
  A Simple Perl Program     682
Perl Variables and Data Structures     684
  Perl Variable Types     685
  Special Variables     685
Operators     686
  Comparison Operators     686
  Compound Operators     687
  Arithmetic Operators     687
  Other Operators     688
  Special String Constants     688
Conditional Statements: if/else and unless     689
  If.     689
  unless     690
Looping     690
  For     690
  Foreach     691
  While     691
  until      692
  last and next     692
  do ... while and do ... until     692
Regular Expressions     693
Access to the Shell     694
Modules and CPAN     695
Code Examples     695
  Sending Mail     695
  Purging Logs     697
  Posting to Usenet     698
  One-Liners     699
  Command-Line Processing     700
References     700
38  Using Python     703
Python on Linux     704
The Basics of Python     705
  Numbers     705
  More on Strings     707
  Lists     710
  Dictionaries     712
  Conditionals and Looping     713
Functions      715
Object Orientation     716
  Class and Object Variables     717
  Constructors and Destructors     718
  Class Inheritance     719
The Standard Library and the Python Package Index     721
References     721
39  Using PHP     723
Introduction to PHP     724
  Entering and Exiting PHP Mode     724
  Variables     724
  Arrays     726
  Constants     728
  References     728
  Comments     729
  Escape Sequences     729
  Variable Substitution     730
  Operators     731
  Conditional Statements     733
  Special Operators     734
  Switching     735
  Loops     737
  Including Other Files     739
Basic Functions     740
  Strings     740
  Arrays     743
  Files     745
  Miscellaneous     747
Handling HTML Forms     751
Databases     751
References     754
40   C/C++ Programming Tools for Ubuntu     755
Programming in C with Linux    756
Using the C Programming Project Management Tools Provided with Ubuntu    757
  Building Programs with make    757
  Using Makefiles    757
  Using the autoconf Utility to Configure Code    759
  Debugging Tools    760
Using the GNU C Compiler    761
Graphical Development Tools    762
  Using the KDevelop Client    762
  The Glade Client for Developing in GNOME    763
References    764
41  Using Other Popular Programming Languages     767
Ada     768
Clojure     768
COBOL     769
Erlang     770
Forth     770
Go     771
Fortran     771
Groovy     771
Haskell     772
Java     772
JavaScript     772
Lisp     773
Lua     773
Mono     774
Ruby     774
Rust     775
Scala     775
Scratch     776
Vala     776
References     776
42  Beginning Mobile Development for Android     779
Introduction to Android     780
  Hardware     780
  Linux Kernel     780
  Libraries     780
  Android Runtime     780
  Application Framework     780
  Applications     781
Installing the Android SDK     781
  Install Java     781
  Install Eclipse     781
  Install the SDK     781
  Install the ADT Eclipse Plug-In     782
  Install Other Components     782
 Install Virtual Devices     783
Create Your First Application     784
References     785
Part VI Appendices
A  Ubuntu Under the Hood     787
What Is Linux?     787
Why Use Linux?     788
What Is Ubuntu?     790
Ubuntu for Business      791
Ubuntu in Your Home     792
64-Bit Ubuntu     793
Getting the Most from Ubuntu and Linux Documentation     793
Ubuntu Developers and Documentation     795
References     795
B  Ubuntu and Linux Internet Resources     797
Websites and Search Engines     798
  Web Search Tips     798
  Google Is Your Friend     799
  Ubuntu Package Listings     799
  Certification     799
  Commercial Support     800
  Documentation     800
  Linux Guides     800
  Ubuntu     801
  Mini-CD Linux Distributions     801
  Various Intel-Based Linux Distributions     802
  PowerPC-Based Linux Distributions     802
  Linux on Laptops and PDAs     802
  The X Window System     803
Usenet Newsgroups     803
Mailing Lists     804
  Ubuntu Project Mailing Lists     805
Internet Relay Chat     805
Index     807


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