Linux Pocket Guide, 4th Edition

Book description

If you use Linux in your day-to-day work, then Linux Pocket Guide is the perfect on-the-job reference. This thoroughly updated 20th anniversary edition explains more than 200 Linux commands, including new commands for file handling, package management, version control, file format conversions, and more.

In this concise guide, author Daniel Barrett provides the most useful Linux commands grouped by functionality. Whether you're a novice or an experienced user, this practical book is an ideal reference for the most important Linux commands.

You'll learn:

  • Essential concepts—commands, shells, users, and the filesystem
  • File commands-creating, organizing, manipulating, and processing files of all kinds
  • Sysadmin basics-superusers, processes, user management, and software installation
  • Filesystem maintenance-disks, RAID, logical volumes, backups, and more
  • Networking commands-working with hosts, network connections, email, and the web
  • Getting stuff done-everything from math to version control to graphics and audio

Publisher resources

View/Submit Errata

Table of contents

  1. First Things First
    1. What’s in This Book?
    2. What’s New in the Fourth Edition?
    3. Conventions Used in This Book
      1. Commands, Prompts, and Output
      2. Your Friend, the echo Command
      3. Long Command Lines
      4. Keystrokes
    4. Downloading the Practice Files
    5. Conventions Used in This Book
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Essential Concepts
    1. What’s Linux?
      1. Launching a Shell
      2. Command-Line Warm-Up
    2. The Structure of Commands
    3. Users and Superusers
    4. The Filesystem
      1. Home Directories
      2. System Directories
      3. Kernel-Related Directories
      4. File Permissions
    5. Selected Features of Bash
      1. Which Shell Are You Running?
      2. Pattern Matching
      3. Brace Expansion
      4. Shell Variables
      5. Search Path
      6. Aliases
      7. Built-in Commands
      8. Input, Output, and Redirection
      9. Combined Commands
      10. Preventing Evaluation
      11. Command-line Editing
      12. Command History
      13. Filename Completion
      14. Shell Job Control
      15. Running Multiple Shells at Once
      16. Killing a Command in Progress
      17. Terminating a Shell
      18. Tailoring Shell Behavior
    6. Getting Help
  3. 2. File Commands
    1. Basic File Operations
    2. Directory Operations
    3. Viewing Files
    4. Creating and Editing Files
      1. Creating a File Quickly
      2. Your Default Editor
    5. Properties of Files
    6. Locating Files
    7. Manipulating Text in Files
      1. awk
      2. sed
      3. m4
      4. Perl, PHP, Python, Ruby
    8. Compressing, Packaging, and Encrypting
    9. Comparing Files
    10. Converting Files to Other Formats
    11. PDF and PostScript File Handling
    12. Printing
    13. Spellchecking
  4. 3. System Administration Basics
    1. Becoming the Superuser
    2. Viewing Processes
    3. Controlling Processes
    4. Scheduling Jobs
    5. Logins, Logouts, and Shutdowns
    6. Users and Their Environment
    7. User Account Management
    8. Group Management
    9. Installing Software Packages
    10. Installing Software from Source Code
      1. Downloading the Source Code
      2. Building and Installing the Code
  5. 4. Filesystem Maintenance
    1. Using Disks and Filesystems
    2. Creating and Modifying Filesystems
    3. RAID Arrays for Redundancy
      1. Create a RAID Array
      2. Replace a Device in a RAID Array
      3. Destroy a RAID Array
    4. Logical Volumes for Flexible Storage
      1. Create a First Logical Volume
      2. View LVM Details
      3. Add a Logical Volume
      4. Add Disks to a Volume Group
      5. Enlarge a Logical Volume
      6. Shrink a Logical Volume
      7. Delete a Logical Volume
      8. Reduce a Volume Group
      9. Delete a Volume Group
      10. Delete a Physical Volume
    5. ZFS: A Modern, Do-It-All Filesystem
      1. Create a ZFS Pool
      2. Create a ZFS Dataset
      3. Create an Encrypted ZFS Dataset
      4. Set Size Limits on ZFS Datasets
      5. Enable Compression on ZFS Datasets
      6. Snapshot a ZFS Dataset
      7. Destroy a ZFS Dataset or Snapshot
      8. Destroy a ZFS Pool
    6. Backups and Remote Storage
  6. 5. Networking Commands
    1. Host Information
    2. Host Location
    3. Network Connections
    4. Email in Daily Use
    5. Email Servers
      1. Postfix: A Full-Featured Mail Server
      2. Nullmailer: Simple Outgoing Email
    6. Web Browsing
  7. 6. Getting Stuff Done
    1. Screen Output
    2. Copy and Paste
    3. Math and Calculations
    4. Dates and Times
    5. Version Control
    6. Containers
      1. Common Docker Operations
    7. Displaying and Processing Images
    8. Audio and Video
    9. Programming with Shell Scripts
      1. Creating and Running Shell Scripts
      2. Whitespace and Linebreaks
      3. Variables
      4. Input and Output
      5. Booleans and Exit Codes
      6. The test Command
      7. Conditionals
      8. Loops
      9. Command-Line Arguments
      10. Exiting with an Exit Code
      11. Piping to bash
      12. Beyond Shell Scripting
    10. Final Words
  8. Index
  9. About the Author

Product information

  • Title: Linux Pocket Guide, 4th Edition
  • Author(s): Daniel J. Barrett
  • Release date: March 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098157968