0%

Book Description

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.

    Table of Contents

    1. Copyright
      1. Dedication
    2. Praise for A Practical Guide to Ubuntu Linux®
      1. Praise for Other Books by Mark Sobell
    3. Preface
      1. This Book Includes Ubuntu Gutsy Gibbon (7.10) on a Live/Install DVD
      2. Features of This Book
      3. Key Topics Covered in This Book
        1. Details
      4. Supplements
      5. Thanks
    4. 1. Welcome to Linux
      1. The GNU–Linux Connection
        1. The History of GNU–Linux
          1. Fade to 1983
          2. Next Scene, 1991
        2. The Code Is Free
        3. Have Fun!
      2. The Linux 2.6 Kernel
      3. The Heritage of Linux: UNIX
      4. What Is So Good About Linux?
        1. Why Linux Is Popular with Hardware Companies and Developers
        2. Linux Is Portable
        3. Standards
        4. The C Programming Language
        5. Ubuntu Linux
      5. Overview of Linux
        1. Linux Has a Kernel Programming Interface
        2. Linux Can Support Many Users
        3. Linux Can Run Many Tasks
        4. Linux Provides a Secure Hierarchical Filesystem
        5. The Shell: Command Interpreter and Programming Language
          1. Filename Generation
          2. Device-Independent Input and Output
          3. Shell Functions
          4. Job Control
        6. A Large Collection of Useful Utilities
        7. Interprocess Communication
        8. System Administration
      6. Additional Features of Linux
        1. GUIs: Graphical User Interfaces
        2. (Inter)Networking Utilities
        3. Software Development
      7. Conventions Used in This Book
      8. Chapter Summary
      9. Exercises
    5. I. Installing Ubuntu Linux
      1. 2. Installation Overview
        1. The Live/Install Desktop CD/DVD
        2. More Information
        3. Planning the Installation
          1. Considerations
          2. Requirements
          3. Processor Architecture
          4. Interfaces: Installer and Installed System
          5. Ubuntu Releases
          6. Ubuntu Editions
          7. Installing a Fresh Copy or Upgrading an Existing Ubuntu System?
          8. Setting Up the Hard Disk
            1. Primary, Extended, and Logical Partitions
            2. Partitioning a Disk
              1. Planning Partitions
              2. Partition Suggestions
          9. RAID
          10. LVM: Logical Volume Manager
        4. The Installation Process
        5. Downloading and Burning a CD/DVD
          1. The Easy Way to Download a CD ISO Image File
          2. Other Ways to Download a CD/DVD ISO Image File
          3. Verifying an ISO Image File
          4. Burning the CD/DVD
        6. Gathering Information About the System
        7. Chapter Summary
        8. Exercises
        9. Advanced Exercises
      2. 3. Step-by-Step Installation
        1. Basic Installation from the Live/Install Desktop CD/DVD
          1. Booting the System
          2. Checking the CD/DVD for Defects
          3. Live Session
            1. The Ubuntu Graphical Installer
              1. Using the Mouse to Work with the Install Window
              2. Using the Keyboard to Work with the Install Window
        2. Graphical Partitioners
          1. gparted: The GNOME Partition Editor
            1. An Empty Hard Disk
            2. Deleting a Partition
            3. Resizing a Partition
          2. ubiquity: Setting Up Partitions
            1. Advanced Guided Partitioning
            2. Manual Partitioning
        3. Upgrading to a New Release
        4. Installing KDE
        5. Setting Up a Dual-Boot System
          1. Creating Free Space on a Windows System
          2. Installing Ubuntu Linux as the Second Operating System
        6. Advanced Installation
          1. The Live/Install Desktop CD: The Initial Install Screen
            1. Menu Selections
            2. The Function Keys
            3. Boot Command Line Parameters (Boot Options)
            4. Virtual Consoles
          2. The Alternate CD Initial Install Screen Menu
          3. The Server CD Initial Install Screen Menu
          4. The DVD
          5. The Ubuntu Textual Installer
            1. Manual Partitioning
            2. Setting Up a RAID Array
        7. The X Window System
          1. displayconfig-gtk: Configures the Display
          2. The xorg.conf File
            1. ServerLayout Section
            2. InputDevice Section
            3. Monitor Section
            4. Device Section
            5. Screen Section
            6. Multiple Monitors
          3. gdm: Displays a Graphical Login
        8. Chapter Summary
        9. Exercises
        10. Advanced Exercises
    6. II. Getting Started with Ubuntu Linux
      1. 4. Introduction to Ubuntu Linux
        1. Curbing Your Power: root Privileges/sudo
        2. A Tour of the Ubuntu Linux Desktop
          1. Logging In on the System
          2. Introduction
          3. Launching Programs from the Desktop
          4. Switching Workspaces
          5. Setting Personal Preferences
          6. Mouse Preferences
          7. Working with Windows
          8. Using Nautilus to Work with Files
            1. The Desktop Directory
            2. Selecting Objects
            3. Emptying the Trash
          9. The Update Notifier
          10. Changing Appearances (Themes)
          11. Session Management
          12. Getting Help
          13. Feel Free to Experiment
          14. Logging Out
        3. Getting the Most out of the Desktop
          1. GNOME Desktop Terminology
          2. Opening Files
          3. Panels
            1. The Panel Menu
            2. Moving a Panel
            3. Panel Objects
            4. The Panel Object Context Menus
          4. The Main Menu
          5. Windows
            1. Changing the Input Focus (Window Cycling)
            2. Cutting and Pasting Objects Using the Clipboard
            3. Using the Root Window
            4. Running Commands from a Terminal Emulator/Shell
          6. The Object Context Menu
            1. The Object Properties Window
        4. Updating, Installing, and Removing Software Packages
          1. Software Sources Window
          2. Add/Remove Applications
        5. Where to Find Documentation
          1. Ubuntu Help Center
          2. man: Displays the System Manual
          3. info: Displays Information About Utilities
          4. The ––help Option
          5. HOWTOs: Finding Out How Things Work
          6. Getting Help with the System
            1. Finding Help Locally
            2. Using the Internet to Get Help
        6. More About Logging In
          1. The Login Screen
          2. What to Do If You Cannot Log In
          3. Logging In Remotely: Terminal Emulators, ssh, and Dial-Up Connections
          4. Logging In from a Terminal (Emulator)
          5. Changing Your Password
          6. Using Virtual Consoles
        7. Working from the Command Line
          1. Correcting Mistakes
            1. Erasing a Character
            2. Deleting a Word
            3. Deleting a Line
            4. Aborting Execution
          2. Repeating/Editing Command Lines
        8. Chapter Summary
        9. Exercises
        10. Advanced Exercises
      2. 5. The Linux Utilities
        1. Special Characters
        2. Basic Utilities
          1. ls: Lists the Names of Files
          2. cat: Displays a Text File
          3. rm: Deletes a File
          4. less Is more: Display a Text File One Screen at a Time
          5. hostname: Displays the System Name
        3. Working with Files
          1. cp: Copies a File
          2. mv: Changes the Name of a File
          3. lpr: Prints a File
          4. grep: Searches for a String
          5. head: Displays the Beginning of a File
          6. tail: Displays the End of a File
          7. sort: Displays a File in Order
          8. uniq: Removes Duplicate Lines from a File
          9. diff: Compares Two Files
          10. file: Tests the Contents of a File
        4. | (Pipe): Communicates Between Processes
        5. Four More Utilities
          1. echo: Displays Text
          2. date: Displays the Time and Date
          3. script: Records a Shell Session
          4. unix2dos: Converts Linux and Macintosh Files to Windows Format
        6. Compressing and Archiving Files
          1. bzip2: Compresses a File
          2. bunzip2 and bzcat: Decompress a File
          3. gzip: Compresses a File
          4. tar: Packs and Unpacks Archives
        7. Locating Commands
          1. which and whereis: Locate a Utility
          2. apropos: Searches for a Keyword
          3. slocate: Searches for a File
        8. Obtaining User and System Information
          1. who: Lists Users on the System
          2. finger: Lists Users on the System
          3. w: Lists Users on the System
        9. Communicating with Other Users
          1. write: Sends a Message
          2. mesg: Denies or Accepts Messages
        10. Email
        11. Tutorial: Creating and Editing a File with vim
          1. Starting vim
          2. Command and Input Modes
          3. Entering Text
          4. Getting Help
            1. Correcting Text as You Insert It
            2. Moving the Cursor
            3. Deleting Text
            4. Undoing Mistakes
            5. Entering Additional Text
            6. Correcting Text
          5. Ending the Editing Session
          6. The compatible Parameter
        12. Chapter Summary
        13. Exercises
        14. Advanced Exercises
      3. 6. The Linux Filesystem
        1. The Hierarchical Filesystem
        2. Directory Files and Ordinary Files
          1. Filenames
            1. Filename Extensions
            2. Hidden Filenames
          2. The Working Directory
          3. Your Home Directory
            1. Startup Files
        3. Pathnames
          1. Absolute Pathnames
            1. ~ (Tilde) in Pathnames
          2. Relative Pathnames
            1. Significance of the Working Directory
        4. Directory Commands
          1. mkdir: Creates a Directory
            1. cd: Changes to Another Working Directory
            2. The . and .. Directory Entries
          2. Important Standard Directories and Files
        5. Working with Directories
          1. rmdir: Deletes a Directory
          2. Using Pathnames
          3. mv, cp: Move or Copy Files
          4. mv: Moves a Directory
        6. Access Permissions
          1. ls –l: Displays Permissions
          2. chmod: Changes Access Permissions
          3. Setuid and Setgid Permissions
          4. Directory Access Permissions
        7. ACLs: Access Control Lists
          1. Enabling ACLs
          2. Working with Access Rules
          3. Setting Default Rules for a Directory
        8. Links
          1. Symbolic Links
            1. ln: Creates a Symbolic Link
          2. rm: Removes a Link
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      4. 7. The Shell
        1. The Command Line
          1. Syntax
            1. Command Name
            2. Arguments
              1. Options
          2. Processing the Command Line
          3. Executing the Command Line
          4. Editing the Command Line
        2. Standard Input and Standard Output
          1. The Screen as a File
          2. The Keyboard and Screen as Standard Input and Standard Output
          3. Redirection
            1. Redirecting Standard Output
            2. Redirecting Standard Input
            3. noclobber: Avoids Overwriting Files
            4. Appending Standard Output to a File
            5. /dev/null: Making Data Disappear
          4. Pipes
            1. Filters
            2. tee: Sends Output in Two Directions
        3. Running a Program in the Background
          1. Moving a Job from the Foreground to the Background
          2. kill: Aborting a Background Job
        4. Filename Generation/Pathname Expansion
          1. The ? Special Character
          2. The * Special Character
          3. The [ ] Special Characters
        5. Builtins
        6. Chapter Summary
          1. Utilities and Builtins Introduced in This Chapter
        7. Exercises
        8. Advanced Exercises
    7. III. Digging into Ubuntu Linux
      1. 8. Linux GUIs: X and GNOME
        1. X Window System
          1. Using X
            1. Starting X from a Character-Based Display
            2. Remote Computing and Local Displays
              1. The X –nolisten tcp Option
              2. xhost Grants Access to a Display
              3. The DISPLAY Variable
              4. The –display Option
              5. Running Multiple X Servers
            3. Stopping the X Server
            4. Remapping Mouse Buttons
          2. Window Managers
            1. KDE and GNOME
            2. GNUStep
        2. The Nautilus File Browser Window
          1. The View Pane
          2. The Side Pane
          3. Control Bars
          4. Menubar
        3. GNOME Utilities
          1. Deskbar Applet
          2. Font Preferences
          3. Pick a Font Window
          4. Pick a Color Window
          5. Run Application Window
          6. Searching for Files
          7. GNOME Terminal Emulator/Shell
        4. Chapter Summary
        5. Exercises
        6. Advanced Exercises
      2. 9. The Bourne Again Shell
        1. Background
        2. Shell Basics
          1. Startup Files
            1. Login Shells
            2. Interactive Nonlogin Shells
            3. Noninteractive Shells
            4. Setting Up Startup Files
            5. . (Dot) or source: Runs a Startup File in the Current Shell
          2. Commands That Are Symbols
          3. Redirecting Standard Error
          4. Writing a Simple Shell Script
            1. chmod: Makes a File Executable
            2. #! Specifies a Shell
            3. # Begins a Comment
            4. Running a Shell Script
          5. Separating and Grouping Commands
            1. ; and NEWLINE Separate Commands
            2. Continues a Command
            3. | and & Separate Commands and Do Something Else
          6. Job Control
            1. jobs: Lists Jobs
            2. fg: Brings a Job to the Foreground
            3. bg: Sends a Job to the Background
          7. Manipulating the Directory Stack
            1. dirs: Displays the Stack
            2. pushd: Pushes a Directory on the Stack
            3. popd: Pops a Directory Off the Stack
        3. Parameters and Variables
          1. User-Created Variables
            1. unset: Removes a Variable
          2. Variable Attributes
            1. readonly: Makes the Value of a Variable Permanent
            2. declare and typeset: Assign Attributes to Variables
          3. Keyword Variables
            1. HOME: Your Home Directory
            2. PATH: Where the Shell Looks for Programs
            3. MAIL: Where Your Mail Is Kept
            4. PS1: User Prompt (Primary)
            5. PS2: User Prompt (Secondary)
            6. PS3: Menu Prompt
            7. PS4: Debugging Prompt
            8. IFS: Separates Input Fields (Word Splitting)
            9. CDPATH: Broadens the Scope of cd
            10. Keyword Variables: A Summary
        4. Special Characters
        5. Processes
          1. Process Structure
          2. Process Identification
          3. Executing a Command
        6. History
          1. Variables That Control History
          2. Reexecuting and Editing Commands
            1. fc: Displays, Edits, and Reexecutes Commands
              1. Viewing the History List
              2. Editing and Reexecuting Previous Commands
              3. Reexecuting Commands Without Calling the Editor
            2. Using an Exclamation Point (!) to Reference Events
              1. Event Designators
          3. The Readline Library
            1. vi Editing Mode
            2. emacs Editing Mode
            3. Readline Completion Commands
            4. Command Completion
              1. Pathname Completion
              2. Variable Completion
            5. .inputrc: Configuring Readline
              1. Variables
              2. Key Bindings
              3. Conditional Constructs
        7. Aliases
          1. Single Versus Double Quotation Marks in Aliases
          2. Examples of Aliases
        8. Functions
        9. Controlling bash Features and Options
          1. Command Line Options
          2. Shell Features
            1. set ±o: Turns Shell Features On and Off
            2. shopt: Turns Shell Features On and Off
        10. Processing the Command Line
          1. History Expansion
          2. Alias Substitution
          3. Parsing and Scanning the Command Line
          4. Command Line Expansion
            1. Order of Expansion
            2. Brace Expansion
            3. Tilde Expansion
            4. Parameter and Variable Expansion
            5. Arithmetic Expansion
            6. Command Substitution
            7. Word Splitting
            8. Pathname Expansion
            9. Process Substitution
        11. Chapter Summary
        12. Exercises
        13. Advanced Exercises
      3. 10. Networking and the Internet
        1. Types of Networks and How They Work
          1. Broadcast Networks
          2. Point-to-Point Networks
          3. Switched Networks
          4. LAN: Local Area Network
            1. Ethernet
            2. Wireless
          5. WAN: Wide Area Network
          6. Internetworking Through Gateways and Routers
            1. Firewall
          7. Network Protocols
            1. IP: Internet Protocol
            2. TCP: Transmission Control Protocol
            3. UDP: User Datagram Protocol
            4. PPP: Point-to-Point Protocol
            5. Xremote and LBX
          8. Host Address
            1. Static Versus Dynamic IP Addresses
          9. Hostnames
            1. IPv6
        2. Communicate Over a Network
          1. finger: Displays Information About Remote Users
          2. Sending Mail to a Remote User
          3. Mailing List Servers
        3. Network Utilities
          1. Trusted Hosts
          2. OpenSSH Tools
          3. telnet: Logs In on a Remote System
            1. Using telnet to Connect to Other Ports
          4. ftp: Transfers Files Over a Network
          5. ping: Tests a Network Connection
          6. traceroute: Traces a Route Over the Internet
          7. host and dig: Query Internet Nameservers
          8. jwhois: Looks Up Information About an Internet Site
        4. Distributed Computing
          1. The Client/Server Model
          2. DNS: Domain Name Service
          3. Ports
          4. NIS: Network Information Service
          5. NFS: Network Filesystem
        5. Usenet
        6. WWW: World Wide Web
          1. URL: Uniform Resource Locator
          2. Browsers
          3. Search Engines
        7. Chapter Summary
        8. Exercises
        9. Advanced Exercises
      4. 11. Programming the Bourne Again Shell
        1. Control Structures
          1. if...then
          2. if...then...else
          3. if...then...elif
            1. Debugging Shell Scripts
          4. for...in
          5. for
          6. while
          7. until
          8. break and continue
          9. case
          10. select
          11. Here Document
        2. File Descriptors
        3. Parameters and Variables
          1. Array Variables
          2. Locality of Variables
            1. Functions
          3. Special Parameters
            1. $$: PID Number
            2. $?: Exit Status
          4. Positional Parameters
            1. $#: Number of Command Line Arguments
            2. $0: Name of the Calling Program
            3. $1–$n: Command Line Arguments
            4. shift: Promotes Command Line Arguments
            5. set: Initializes Command Line Arguments
          5. Expanding Null and Unset Variables
            1. :– Uses a Default Value
            2. := Assigns a Default Value
            3. :? Displays an Error Message
        4. Builtin Commands
          1. type: Displays Information About a Command
          2. read: Accepts User Input
          3. exec: Executes a Command
          4. trap: Catches a Signal
          5. kill: Aborts a Process
          6. getopts: Parses Options
          7. A Partial List of Builtins
        5. Expressions
          1. Arithmetic Evaluation
          2. Logical Evaluation (Conditional Expressions)
          3. String Pattern Matching
          4. Operators
        6. Shell Programs
          1. A Recursive Shell Script
          2. The quiz Shell Script
        7. Chapter Summary
        8. Exercises
        9. Advanced Exercises
    8. IV. System Administration
      1. 12. System Administration: Core Concepts
        1. Running Commands with root Privileges
          1. sudo: Running a Command with root Privileges
            1. Options
          2. sudoers: Configuring sudo
            1. User Privilege Specifications
            2. Aliases
            3. Defaults (Options)
          3. Unlocking the root Account (Assigning a Password to root)
          4. su: Gives You Another User’s Privileges
        2. The Upstart Event-Based init Daemon
          1. Software Packages
          2. Definitions
          3. Jobs
            1. Administrator-Defined Jobs
            2. Job Definition Files in /etc/event.d
          4. SysVinit (rc) Scripts: Start and Stop System Services
            1. sysv-rc-conf: Configures Services
        3. System Operation
          1. Runlevels
          2. Booting the System
          3. Recovery (Single-User) Mode
            1. Booting the System into Recovery (Single-User) Mode
              1. Booting to Recovery Mode from a Hard Drive
              2. Booting to Recovery Mode from an Installation CD
          4. Going to Multiuser Mode
          5. Logging In
          6. Logging Out
          7. Bringing the System Down
            1. CONTROL-ALT-DEL: Reboots the System
            2. Going to Recovery (Single-User) Mode
            3. Turning the Power Off
          8. Crash
            1. Repairing a Filesystem
            2. When the System Does Not Boot
        4. Avoiding a Trojan Horse
        5. Getting Help
        6. Textual System Administration Utilities
          1. kill: Sends a Signal to a Process
          2. Other Textual Utilities
        7. Setting Up a Server
          1. Standard Rules in Configuration Files
            1. Specifying Clients
            2. Specifying a Subnet
          2. rpcinfo: Displays Information About portmap
          3. The inetd and xinetd Superservers
          4. Securing a Server
            1. TCP Wrappers: Secure a Server (hosts.allow and hosts.deny)
            2. Setting Up a chroot Jail
              1. Using chroot
              2. Running a Service in a chroot Jail
              3. Security Considerations
          5. DHCP: Configures Network Interfaces
            1. More Information
            2. How DHCP Works
            3. DHCP Client
              1. Prerequisites
              2. dhclient: The DHCP Client
            4. DHCP Server
              1. Prerequisites
              2. dhcpd: The DHCP Daemon
              3. Static IP Addresses
        8. nsswitch.conf: Which Service to Look at First
          1. How nsswitch.conf Works
            1. Information
            2. Methods
            3. Search Order
            4. Action Items
            5. compat Method: ± in passwd, group, and shadow Files
        9. PAM
          1. More Information
          2. Configuration Files, Module Types, and Control Flags
          3. Example
          4. Modifying the PAM Configuration
        10. Chapter Summary
        11. Exercises
        12. Advanced Exercises
      2. 13. Files, Directories, and Filesystems
        1. Important Files and Directories
        2. File Types
          1. Ordinary Files, Directories, Links, and Inodes
          2. Special Files
            1. FIFO Special File (Named Pipe)
            2. Sockets
            3. Major and Minor Device Numbers
            4. Block and Character Devices
            5. Raw Devices
        3. Filesystems
          1. mount: Mounts a Filesystem
            1. Mount Options
            2. Mounting a Linux Floppy Diskette
          2. umount: Unmounts a Filesystem
          3. fstab: Keeps Track of Filesystems
          4. fsck: Checks Filesystem Integrity
          5. tune2fs: Changes Filesystem Parameters
          6. RAID Filesystem
        4. Chapter Summary
        5. Exercises
        6. Advanced Exercises
      3. 14. Downloading and Installing Software
        1. JumpStart: Installing and Removing Packages Using aptitude
        2. Finding the Package That Holds a File You Need
        3. APT: Keeps the System Up-to-Date
          1. Repositories
          2. sources.list: Specifies Repositories for APT to Search
          3. The APT Local Package Indexes and the APT Cache
          4. The apt cron Script and APT Configuration Files
          5. aptitude: Works with Packages and the Local Package Index
            1. aptitude Commands
            2. aptitude Options
            3. aptitude update: Synchronizes Local Package Indexes with Repositories
            4. aptitude safe-upgrade and aptitude full-upgrade: Upgrade the System
            5. aptitude search: Searches the Repositories for Packages
            6. aptitude show: Displays Package Information
          6. apt-cache: Displays Package Information
          7. apt-get source: Downloads Source Files
        4. dpkg: The Debian Package Management System
          1. deb Files
          2. dpkg: The Foundation of the Debian Package Management System
            1. dpkg ––update-avail: Updates the List of Available Packages
            2. dpkg ––list: Displays Information About a Package
            3. dpkg ––install: Installs a Package
            4. dpkg ––remove and dpkg ––purge: Remove an Installed Package
            5. dpkg ––status: Displays Information About a Package
            6. dpkg ––search: Displays the Name of the Package That Contains a Specified File
            7. dpkg ––listfiles: Lists Files Within a Package
        5. BitTorrent
          1. Prerequisites
          2. Using BitTorrent
        6. Installing Non-dpkg Software
          1. The /opt and /usr/local Directories
          2. GNU Configure and Build System
        7. wget: Downloads Files Noninteractively
        8. Chapter Summary
        9. Exercises
        10. Advanced Exercises
      4. 15. Printing with CUPS
        1. Introduction
          1. Prerequisites
          2. More Information
          3. Notes
        2. JumpStart I: Configuring a Local Printer
        3. system-config-printer: Configuring a Printer
          1. Configuration Tabs
          2. Setting Up a Remote Printer
        4. JumpStart II: Configuring a Remote Printer Using the CUPS Web Interface
        5. Traditional UNIX Printing
        6. Configuring Printers
          1. The CUPS Web Interface
            1. Setting Up and Modifying a Printer
            2. Jobs
            3. Classes
          2. CUPS on the Command Line
            1. lpinfo: Displays Available Drivers
            2. lpadmin: Configures Printers
              1. Adding or Modifying a Printer
              2. Example lpadmin Commands
            3. Printing Quotas
            4. Managing Print Queues
          3. Sharing CUPS Printers
        7. Printing from Windows
          1. Printing Using CUPS
          2. Printing Using Samba
        8. Printing to Windows
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      5. 16. Building a Linux Kernel
        1. Prerequisites
        2. Downloading the Kernel Source Code
          1. aptitude: Downloading and Installing the Kernel Source Code
          2. git: Obtaining the Latest Kernel Source Code
        3. Read the Documentation
        4. Configuring and Compiling the Linux Kernel
          1. .config: Configures the Kernel
            1. Replacing a Custom Kernel
          2. Customizing a Kernel
          3. Cleaning the Source Tree
          4. Compiling a Kernel Image File and Loadable Modules
          5. Using Loadable Kernel Modules
            1. Finding Nonstandard Modules
            2. module-assistant: Downloading, Compiling, and Installing Nonstandard Modules
            3. Loading a Module
        5. Installing the Kernel, Modules, and Associated Files
        6. Rebooting
        7. grub: The Linux Boot Loader
          1. menu.lst: Configures grub
          2. update-grub: Updates the menu.lst file
            1. List of Directives
          3. grub-install: Installs the MBR and grub Files
            1. Reinstalling the MBR
        8. dmesg: Displays Kernel Messages
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      6. 17. Administration Tasks
        1. Configuring User and Group Accounts
          1. users-admin: Manages User Accounts
          2. useradd: Adds a User Account
          3. userdel: Removes a User Account
          4. usermod: Modifies a User Account
          5. groupadd: Adds a Group
          6. groupdel: Removes a Group
        2. Backing Up Files
          1. Choosing a Backup Medium
          2. Backup Utilities
            1. tar: Archives Files
            2. cpio: Archives Files
          3. Performing a Simple Backup
          4. dump, restore: Back Up and Restore Filesystems
        3. Scheduling Tasks
          1. cron and anacron: Schedule Routine Tasks
            1. Crontab Files
          2. at: Runs Occasional Tasks
        4. System Reports
          1. vmstat: Reports Virtual Memory Statistics
          2. top: Lists Processes Using the Most Resources
        5. parted: Reports on and Partitions a Hard Disk
        6. Keeping Users Informed
        7. Creating Problems
        8. Solving Problems
          1. Helping When a User Cannot Log In
          2. Speeding Up the System
          3. lsof: Finds Open Files
          4. Keeping a Machine Log
          5. Keeping the System Secure
          6. Log Files and Mail for root
          7. Monitoring Disk Usage
          8. logrotate: Manages Log Files
          9. Removing Unused Space from Directories
          10. syslogd: Logs System Messages
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      7. 18. Configuring a LAN
        1. Setting Up the Hardware
          1. Connecting the Computers
          2. Routers
          3. NIC: Network Interface Card
          4. Tools
            1. lspci: Lists PCI Information
            2. lshw: Lists Hardware Information
        2. Configuring the Systems
          1. network-admin: Configures Network Connections
          2. nm-applet: Configures Network Connections Automatically
          3. iwconfig: Configures a Wireless NIC
        3. Setting Up Servers
        4. More Information
        5. Chapter Summary
        6. Exercises
        7. Advanced Exercises
    9. V. Using Clients and Setting Up Servers
      1. 19. OpenSSH: Secure Network Communication
        1. Introduction
        2. About OpenSSH
          1. Files
            1. /etc/ssh: Global Files
            2. ~/.ssh: User Files
          2. How OpenSSH Works
          3. More Information
        3. OpenSSH Clients
          1. Prerequisites
          2. JumpStart: Using ssh and scp
          3. Setup
            1. Recommended Settings
            2. Server Authentication/Known Hosts
          4. ssh: Connects to or Executes Commands on a Remote System
            1. Options
          5. scp: Copies Files to and from a Remote System
            1. Options
          6. sftp: A Secure FTP Client
          7. ~/.ssh/config and /etc/ssh/ssh_config Configuration Files
        4. sshd: OpenSSH Server
          1. Prerequisites
          2. Note
          3. JumpStart: Starting the sshd Daemon
            1. Recommended Settings
          4. Authorized Keys: Automatic Login
          5. Command Line Options
          6. /etc/ssh/sshd_config Configuration File
        5. Troubleshooting
        6. Tunneling/Port Forwarding
        7. Chapter Summary
        8. Exercises
        9. Advanced Exercises
      2. 20. FTP: Transferring Files Across a Network
        1. Introduction
        2. More Information
        3. FTP Client
          1. Prerequisites
          2. JumpStart I: Downloading Files Using ftp
            1. Basic Commands
            2. Tutorial Session
          3. Notes
          4. Anonymous FTP
          5. Automatic Login
          6. Binary Versus ASCII Transfer Mode
          7. ftp Specifics
            1. Format
            2. Command Line Options
            3. ftp Commands
              1. Shell Command
              2. Transfer Files
              3. Status
              4. Directories
              5. Files
              6. Display Information
        4. FTP Server (vsftpd)
          1. Prerequisites
          2. Notes
          3. JumpStart II: Starting a vsftpd Server
          4. Testing the Setup
          5. vsftpd.conf: The vsftpd Configuration File
            1. Stand-Alone Mode
            2. Logging In
              1. Local Users
              2. Anonymous Users
            3. The Working Directory and the chroot Jail
            4. Downloading and Uploading Files
              1. Download/Upload for Local Users
              2. Anonymous Users
            5. Messages
            6. Display
            7. Logs
            8. Connection Parameters
              1. Passive (PASV) Connections
              2. Active (PORT) Connections
              3. Timeouts
            9. Miscellaneous
            10. Files
        5. Chapter Summary
        6. Exercises
        7. Advanced Exercises
      3. 21. exim4: Setting Up Mail Servers, Clients, and More
        1. Introduction to exim4
          1. Prerequisites
          2. Notes
          3. More Information
        2. JumpStart I: Configuring exim4 to Use a Smarthost
        3. JumpStart II: Configuring exim4 to Send and Receive Email
        4. How exim4 Works
          1. Mail Logs
          2. Working with Messages
          3. Aliases and Forwarding
          4. Related Programs
        5. Configuring exim4
          1. Using a Text Editor to Configure exim4
          2. The update-exim4.conf.conf Configuration File
          3. dpkg-reconfigure: Configures exim4
        6. SpamAssassin
          1. Prerequisites
          2. How SpamAssassin Works
          3. Testing SpamAssassin
          4. Configuring SpamAssassin
            1. Running SpamAssassin on a Mail Server
        7. Additional Email Tools
          1. Webmail
          2. Mailing Lists
          3. Setting Up an IMAP or POP3 Server
        8. Authenticated Relaying
          1. Creating a Self-Signed Certificate for exim4
          2. Enabling SSL in exim4
          3. Enabling SSL in the Mail Client
        9. Alternatives to exim4
        10. Chapter Summary
        11. Exercises
        12. Advanced Exercises
      4. 22. NIS: Network Information Service
        1. Introduction to NIS
        2. How NIS Works
          1. More Information
        3. Setting Up an NIS Client
          1. Prerequisites
          2. Notes
          3. Step-by-Step Setup
            1. /etc/defaultdomain: Specifies the NIS Domain Name
            2. /etc/yp.conf: Specifies an NIS Server
          4. Testing the Setup
          5. yppasswd: Changes NIS Passwords
            1. passwd Versus yppasswd
            2. Modifying User Information
            3. Adding and Removing Users
        4. Setting Up an NIS Server
          1. Prerequisites
          2. Notes
          3. Step-by-Step Setup
            1. /etc/default/nis: Allows the NIS Server to Start
            2. Specify the System’s NIS Domain Name
            3. /etc/ypserv.conf: Configures the NIS Server
              1. Options
              2. Access Rules
            4. /var/yp/securenets: Enhances Security
            5. /var/yp/Makefile: Specifies Maps
              1. Variables
              2. File Locations
              3. The ALL Target
            6. Start the Servers
            7. ypinit: Builds or Imports the Maps
          4. Testing
          5. yppasswdd: The NIS Password Update Daemon
            1. Start yppasswdd
            2. Allow GECOS and Login Shell Modification
        5. Chapter Summary
        6. Exercises
        7. Advanced Exercises
      5. 23. NFS: Sharing Filesystems
        1. Introduction
        2. More Information
        3. Setting Up an NFS Client
          1. Prerequisites
          2. JumpStart I: Mounting a Remote Directory Hierarchy
            1. mount: Mounts a Remote Directory Hierarchy
            2. umount: Unmounts a Remote Directory Hierarchy
          3. mount: Mounts a Directory Hierarchy
            1. Attribute Caching
            2. Error Handling
            3. Miscellaneous Options
          4. Improving Performance
          5. /etc/fstab: Mounts Directory Hierarchies Automatically
        4. Setting Up an NFS Server
          1. Prerequisites
          2. Notes
          3. JumpStart II: Configuring an NFS Server Using shares-admin
          4. Manually Exporting a Directory Hierarchy
            1. /etc/exports: Holds a List of Exported Directory Hierarchies
            2. General Options
            3. User ID Mapping Options
          5. Where the System Keeps NFS Mount Information
            1. showmount: Displays NFS Status Information
          6. exportfs: Maintains the List of Exported Directory Hierarchies
            1. Options
          7. Testing the Server Setup
        5. automount: Mounts Directory Hierarchies on Demand
          1. Prerequisites
          2. More Information
          3. autofs: Automatically Mounted Directory Hierarchies
        6. Chapter Summary
        7. Exercises
        8. Advanced Exercises
      6. 24. Samba: Linux and Windows File and Printer Sharing
        1. Introduction
        2. About Samba
          1. Prerequisites
          2. More Information
          3. Notes
          4. Samba Users, User Maps, and Passwords
        3. JumpStart: Configuring a Samba Server Using shares-admin
        4. swat: Configures a Samba Server
        5. smb.conf: Manually Configuring a Samba Server
          1. Parameters in the smbd.conf File
            1. Global Parameters
            2. Security Parameters
            3. Logging Parameters
            4. Browser Parameters
            5. Communication Parameters
            6. Share Parameters
          2. The [homes] Share: Sharing Users’ Home Directories
        6. Accessing Linux Shares from Windows
          1. Browsing Shares
          2. Mapping a Share
        7. Accessing Windows Shares from Linux
          1. smbtree: Displays Windows Shares
          2. smbclient: Connects to Windows Shares
          3. Browsing Windows Networks
          4. Mounting Windows Shares
        8. Troubleshooting
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      7. 25. DNS/BIND: Tracking Domain Names and Addresses
        1. Introduction to DNS
          1. Nodes, Domains, and Subdomains
          2. Zones
          3. Queries
          4. Servers
          5. Resource Records
          6. DNS Query and Response
          7. Reverse Name Resolution
        2. About DNS
          1. How DNS Works
          2. Prerequisites
          3. More Information
          4. Notes
        3. JumpStart: Setting Up a DNS Cache
        4. Setting Up BIND
          1. named.conf: The named Configuration File
            1. IP-list
            2. Comments
            3. Included Files
            4. Options clause
            5. Zone Clause
          2. Zone Files
            1. Time Formats
            2. Domain Qualification
            3. Zone Name
            4. Zone File Directives
          3. A DNS Cache
            1. named.conf: The named Configuration File
            2. named.conf.options: Options File
            3. Zone Files
          4. DNS Glue Records
          5. TSIGs: Transaction Signatures
            1. Creating a Secret Key
            2. Using the Shared Secret
          6. Running BIND in a chroot Jail
        5. Troubleshooting
        6. A Full-Functioned Nameserver
        7. A Slave Server
        8. A Split Horizon Server
        9. Chapter Summary
        10. Exercises
        11. Advanced Exercises
      8. 26. firestarter and iptables: Setting Up a Firewall
        1. About firestarter
          1. Prerequisites
          2. Notes
          3. More Information
        2. JumpStart: Building a Firewall Using the firestarter Firewall Wizard
        3. firestarter: Maintains a Firewall
          1. The Status Tab
          2. The Events Tab
          3. The Policy Tab
            1. Inbound Policy
            2. Outbound Policy
        4. How iptables Works
        5. About iptables
          1. More Information
          2. Prerequisites
          3. Notes
        6. Anatomy of an iptables Command
        7. Building a Set of Rules
          1. Commands
          2. Packet Match Criteria
          3. Display Criteria
          4. Match Extensions
            1. Implicit Match Extensions
              1. TCP
              2. UDP
              3. ICMP
            2. Explicit Match Extensions
              1. State
          5. Targets
        8. Copying Rules to and from the Kernel
        9. Sharing an Internet Connection Using NAT
          1. Connecting Several Clients to a Single Internet Connection
          2. Connecting Several Servers to a Single Internet Connection
        10. Chapter Summary
        11. Exercises
        12. Advanced Exercises
      9. 27. Apache: Setting Up a Web Server
        1. Introduction
        2. About Apache
          1. Prerequisites
          2. More Information
          3. Notes
        3. JumpStart: Getting Apache Up and Running
          1. Modifying the Configuration Files
          2. Testing Apache
          3. Putting Your Content in Place
        4. Configuring Apache
          1. Configuration Tools
          2. Include Directives
          3. Filesystem Layout
        5. Configuration Directives
          1. Directives I: Directives You May Want to Modify as You Get Started
          2. Contexts and Containers
            1. Contexts
            2. Containers
          3. Directives II: Advanced Directives
            1. Directives That Control Processes
            2. Networking Directives
            3. Logging Directives
            4. Directives That Control Content
            5. Configuration Directives
            6. Security Directives
        6. The Ubuntu apache2.conf File
        7. The Ubuntu default Configuration File
        8. Redirects
        9. Content Negotiation
          1. Type Maps
          2. MultiViews
        10. Server-Generated Directory Listings (Indexing)
        11. Virtual Hosts
          1. Setting Up a Virtual Host
          2. Types of Virtual Hosts
          3. The default Virtual Host
          4. Examples
        12. Troubleshooting
        13. Modules
          1. mod_cgi and CGI Scripts
          2. mod_ssl
            1. Setting Up mod_ssl
            2. Using a Self-Signed Certificate for Encryption
            3. Notes on Certificates
          3. Authentication Modules and .htaccess
          4. Scripting Modules
          5. Multiprocessing Modules (MPMs)
        14. webalizer: Analyzes Web Traffic
        15. MRTG: Monitors Traffic Loads
        16. Error Codes
        17. Chapter Summary
        18. Exercises
        19. Advanced Exercises
    10. VI. Appendixes
      1. A. Regular Expressions
        1. Characters
        2. Delimiters
        3. Simple Strings
        4. Special Characters
          1. Periods
          2. Brackets
          3. Asterisks
          4. Carets and Dollar Signs
          5. Quoting Special Characters
        5. Rules
          1. Longest Match Possible
          2. Empty Regular Expressions
        6. Bracketing Expressions
        7. The Replacement String
          1. Ampersand
          2. Quoted Digit
        8. Extended Regular Expressions
        9. Appendix Summary
      2. B. Help
        1. Solving a Problem
        2. Finding Linux-Related Information
          1. Documentation
          2. Useful Linux Sites
          3. Linux Newsgroups
          4. Mailing Lists
          5. Words
          6. Software
          7. Office Suites and Word Processors
        3. Specifying a Terminal
      3. C. Security
        1. Encryption
          1. Public Key Encryption
          2. Symmetric Key Encryption
          3. Encryption Implementation
          4. GnuPG/PGP
        2. File Security
        3. Email Security
          1. MTAs (Mail Transfer Agents)
          2. MUAs (Mail User Agents)
        4. Network Security
          1. Network Security Solutions
          2. Network Security Guidelines
        5. Host Security
          1. Login Security
          2. Remote Access Security
          3. Viruses and Worms
          4. Physical Security
        6. Security Resources
        7. Appendix Summary
      4. D. The Free Software Definition
      5. E. The Linux 2.6 Kernel
        1. Native Posix Thread Library (NPTL)
        2. IPSecurity (IPSec)
        3. Asynchronous I/O (AIO)
        4. O(1) Scheduler
        5. OProfile
        6. kksymoops
        7. Reverse Map Virtual Memory (rmap VM)
        8. HugeTLBFS: Translation Look-Aside Buffer Filesystem
        9. remap_file_pages
        10. 2.6 Network Stack Features (IGMPv3, IPv6, and Others)
        11. Internet Protocol Virtual Server (IPVS)
        12. Access Control Lists (ACLs)
        13. 4GB-4GB Memory Split: Physical Address Extension (PAE)
        14. Scheduler Support for HyperThreaded CPUs
        15. Block I/O (BIO) Block Layer
        16. Support for Filesystems Larger Than 2 Terabytes
        17. New I/O Elevators
        18. Interactive Scheduler Response Tuning
    11. Glossary
    18.223.125.219