Mastering Linux

Free Standard Shipping

Purchasing Options

ISBN 9781439806869
Cat# K10350



SAVE 20%

eBook (VitalSource)
ISBN 9781439806876
Cat# KE10330



SAVE 30%

eBook Rentals


  • Promotes hands-on learning through many useful, concrete examples
  • Contains a primer to help you get started quickly
  • Explains both GUI (desktop) and CLI (command line) usage, including the GNOME desktop and Bash shell
  • Covers commands, filters, pipelines, regular expressions, files, directories, networking protocols, and Internet security aspects
  • Shows how to web host with Apache, PHP, and MySQL
  • Offers Linux support for C-level programming
  • Describes GUI scripting with Ruby/GTK2
  • Provides supplementary materials on the book’s website


Encouraging hands-on practice, Mastering Linux provides a comprehensive, up-to-date guide to Linux concepts, usage, and programming. Through a set of carefully selected topics and practical examples, the book imparts a sound understanding of operating system concepts and shows how to use Linux effectively.

Ready-to-Use Examples Offer Immediate Access to Practical Applications
After a primer on the fundamentals, the text covers user interfaces, commands and filters, Bash Shell scripting, the file system, networking and Internet use, and kernel system calls. It presents many examples and complete programs ready to run on your Linux system. Each chapter includes a summary and exercises of varying degrees of difficulty.

Web Resource
The companion website at offers a host of ancillary materials. Along with links to numerous resources, it includes appendices on SSH and SFTP, VIM, text editing with Vi, and the emacs editor. The site also provides a complete example code package for download.

Master the Linux Operating System Toolbox
This book enables you to leverage the capabilities and power of the Linux system more effectively. Going beyond this, it can help you write programs at the shell and C levels—encouraging you to build new custom tools for applications and R&D.

Table of Contents

A Linux Primer
What Is an Operating System?
Getting Started: Login and Logout
Understanding the Shell
Using Files and Directories
Protecting Files: Access Control
Text Editing
Getting Hard/Saved Copies
Communicating with Others
Browsing the Web
Creating and Running Your Own Program
Consulting Linux Documentation
Rounding up Useful Commands

Interactive Use of the Shell
Interacting with Bash
Command-Line Editing and Command Completion
Bash Command Execution
Bash Input/Output Redirection
Bash Job Control
Bash Shell Expansions
Bash Built-in Commands
Shell Variables
Environment of a Program
Examples of Bash Usage
Default File Permissions
Shell Startup and Initialization
Shell Special Characters and Quoting
Simple Functions
For More Information

Desktops, Windows, and Applications
Desktop Overview: GNOME and KDE
GNOME Desktop Components
Working with the GNOME Desktop
Nautilus: The GNOME File Manager
Graphical Applications
The GNOME Terminal
Saving Energy
Accessing Help and Documentation

Filters and Regular Expressions
Commands and Filters
The grep Command
Regular Expressions
Patterns for grep
A Stream Editor: sed
Building Pipelines
Pattern Processing: awk
For More Information

Writing Shell Scripts
Invoking Shell Scripts
A First Shell Script
Shell Script Execution
Positional Parameters
The for Command
The if Command
Test Expressions and Exit Status
The shift Command
The case Command
The while and until Commands
Numerical Expressions
The break and continue Commands
File Queries
Variable Modifiers
The Here Document
More on Functions
Redefining Bash Built-in Functions
Example Bash Scripts
Debugging Shell Scripts
Error and Interrupt Handling
The Perl Alternative
For More Information

The File System
A File Location Road Map
File Types
More on File Access Control
File Status
File System Implementation
The Filesystem Table
File Storage Quotas
Creating Special Files
Network Filesystem
Searching the File Tree: find
The locate Command
Saving, Compressing, and Distributing Files
More File-Related Commands
For More Information

Networking, Internet, and the Web
Networking Protocols
The Internet
The Domain Name System
Networking in Nautilus
Networking Commands
SSH with X11 Forwarding
Public-Key Cryptography and Digital Signature
Secure Email with Mutt and GnuPG
Message Digests
The Web
Handling Different Content Types
Putting Information on the Web
What Is HTML?
Web Hosting
Domain Registration
Dynamic Generation of Web Pages
HTTP Briefly
A Real HTTP Experience
For More Information

Web Hosting: Apache, PHP and MySQL
What Is a Web Server?
Request Processing
Response and Content Types
The Apache Web Server
Apache on Linux
Apache Run-Time Configuration
Access Control under Apache
Requiring Passwords
How HTTP Basic Authentication Works
How HTTP Digest Authentication Works
Password Encryption
Automatic File Deflation
Installing Apache with Package Management
Manual Installation of Apache
What Is PHP?
The PHP Module for Apache
Testing PHP
PHP Configuration
Database Support for the Web
Installing phpMyAdmin
Installing MySQL
Linux Package Management
For More Information

C Programming in Linux
Command-Line Arguments
Linux Command Argument Conventions
The GCC Compiler
The C Library
Creating Libraries and Archives
Error Handling in C Programs
Error Recovery
Debugging with GDB
Examining Core Dumps
For More Information

I/O and Process Control System Calls
System-Level I/O
I/O Descriptors
Reading and Writing I/O Descriptors
Operations on Files
Operations on Directories
Directory Access
An Example: ccp
Shell-Level Commands from C Programs
Process Control
The Process Table
Process Creation: fork
Program Execution: exec Routines
Synchronization of Parent and Child Processes
Process Termination
The User Environment of a Process
Interrupts and Signals
For More Information

Interprocess and Network Communication
Opening a Process for I/O
IPC with pipe
Two-Way Pipe Connections
Network Communication
A TCP Echo Client
Using Datagram Sockets
Socket I/O System Calls
TCP-Based Servers
Network Library Routines
On-Demand Internet Services
Daemon Processes
I/O Multiplexing
TCP Out-of-Band Data
For More Information

GUI Programming with Ruby/GTK2
Getting Started with Ruby/GTK2
GTK+ Event Handling Basics
A Ruby Primer
GTK+ Widgets
More about Events
OOP with Ruby/GTK2
A Tic Tac Toe Game
Menu Bar
Drag and Drop
For More Information


A Summary and Exercises appear at the end of each chapter.

Appendices can be found at

Author Bio(s)

Editorial Reviews

This outstanding book … gives the reader robust concepts and implementable knowledge of this environment. Graphical user interface (GUI)-based users and developers do not get short shrift, despite the command-line interface’s (CLI) full-power treatment. … Every programmer should read the introduction’s Unix/Linux philosophy section. … This authoritative and exceptionally well-constructed book has my highest recommendation. It will repay careful and recursive study.
Computing Reviews, August 2011

Designed as a primer for the popular Linux family of operating systems, this volume walks the reader quickly but clearly through basic operations and on into more advanced core concepts necessary for a deeper understanding of this open source software environment. Appropriate as a textbook for programmers or intermediate computer science students with a solid working knowledge of computer operating systems, the work provides some step-by-step instructions but focuses more on delivering conceptual understanding of the meaning and usage of commands and procedures for common Linux computing tasks. Each chapter in this volume provides illustrations, code examples, a concept summary and a collection of study exercises. Access to a companion website containing appendices and sample programs is included.
SciTech Book News, February 2011