You are previewing CompTIA® Linux+ / LPIC-1 Cert Guide: (Exams LX0-103 & LX0-104/101-400 & 102-400).
O'Reilly logo
CompTIA® Linux+ / LPIC-1 Cert Guide: (Exams LX0-103 & LX0-104/101-400 & 102-400)

Book Description

The LPIC-1 Authorized Cert Guide has a single goal: to help you pass the new version of the Linux Professional Institute LPIC-1 exams. The most comprehensive and time-efficient LPIC-1 study guide available, it's an extraordinarily cost-effective alternative to expensive training: a perfect resource for all LPIC-1 candidates. Authored by a leading LPI insider and long-time Linux trainer, it presents focused, straight-to-the-point coverage of all LPIC-1 exam topics, including:

  • System Architecture

  • Linux Installation and Package Management

  • GNU and Unix Commands

  • Devices, Linux Filesystems, Filesystem Hierarchy Standard

  • Shells, Scripting and Data Management

  • User Interfaces and Desktops

  • Administrative Tasks

  • Essential System Services

  • Networking Fundamentals

  • Security

  • From start to finish, it's organized to help you focus your study time where you need the most help, so you can retain more, and earn higher scores:

  • Pre-chapter "Do I Know This Already" (DIKTA) quizzes help you assess your knowledge of each chapter's content, and decide how much time to spend on each section

  • Foundation Topics sections thoroughly explain concepts and theory, and link them to real-world configurations and commands

  • Key Topics icons flag every figure, table, or list you absolutely must understand and remember

  • Chapter-ending Exam Preparation sections deliver even more exercises and troubleshooting scenarios

  • Two full sample exams offer realistic practice delivered through Pearson's state-of-the-art PCPT test engine

  • Table of Contents

    1. About This E-Book
    2. Title Page
    3. Copyright Page
    4. Contents at a Glance
    5. Contents
    6. About the Authors
    7. About the Contributing Author
    8. About the Technical Reviewer
    9. Dedications
    10. Acknowledgments
    11. We Want to Hear from You!
    12. Reader Services
    13. Introduction
      1. Goals and Methods
        1. Who Should Read This Book?
        2. How To Use This Book
        3. How This Book Is Organized
        4. Pearson IT Certification Practice Test Engine and Questions on the DVD
        5. Install the Software from the DVD
        6. Activate and Download the Practice Exam
        7. Activating Other Exams
        8. Certification Exam Topics and This Book
        9. Assessing Exam Readiness
        10. Exam Registration
        11. Where Are the Companion Content Files?
    14. Chapter 1. Installing Linux
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Understanding Your Hardware
          1. Peripheral Compatibility
          2. Enumerating Your Peripherals
          3. The Proc Filesystem
          4. Note
        2. Laying Out the Hard Drive
          1. Partitions and Devices
          2. The Root Filesystem
          3. Logical Volume Manager (LVM)
          4. Commonly Used Mounts
          5. Swap Files
        3. Working with Boot Managers
          1. GRUB Legacy
          2. GRUB2
        4. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    15. Chapter 2. Boot Process and Runlevels
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. The Linux Boot Process
          1. What Is the Boot Process?
          2. Boot Loaders
          3. Common Commands at Boot Time
        2. Boot Sequence from BIOS to Fully Running System
          1. SysVinit
        3. systemd
          1. Units in systemd
          2. systemd Targets and Runlevels
          3. Wants and Requires
        4. Booting with systemd
          1. Upstart
          2. Setting the Default Runlevels
          3. Changing Runlevels
          4. Note
        5. Shut Down and Reboot from the Command Line
          1. Note
          2. Alerting Users
          3. Note
        6. Properly Terminating Processes
          1. kill and killall
          2. Reloading or “Hanging Up” Processes
        7. Logging Boot Events
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    16. Chapter 3. Package Install and Management
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Software in a Linux System
          1. Shared Libraries
          2. Working with Shared Libraries
          3. Determining Required Libraries
          4. Note
          5. Caution
        2. Debian Package Management
          1. Managing Local Debian Packages
          2. Using Remote Repositories
        3. RPM and YUM Package Management
          1. The RPM Database
          2. The rpm Command
          3. Querying Packages
          4. Package Management with YUM
          5. Configuring Yum
        4. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    17. Chapter 4. Basic Command Line Usage
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. What Is a Shell?
          1. Note
        2. Global and User Settings
          1. Sourcing Versus Executing
          2. Sourcing a Script
          3. A Login Shell Session
          4. A Non-Login Shell Session
        3. Using the Command Line
          1. There Are Commands and, Well, Commands
          2. Structuring Commands
          3. Breaking Long Command Lines
          4. Command Completion
          5. Note
          6. Special Characters in the Shell
        4. Controlling Command Execution
          1. Possible Exit Statuses
        5. Environment Variables and Settings
          1. The Path
          2. Getting $HOME
          3. bash’s History Feature
          4. Important History Variables
        6. Setting Options in bash
          1. Important bash Options
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    18. Chapter 5. File Management
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Filesystem Overview
          1. What Belongs Where
        2. File Management Commands
          1. Tips for Working with Linux Files
          2. Basic Navigation
          3. Advanced Navigation
          4. Listing Files and Directories
          5. Determining File Types
          6. Touching Files
          7. Copying Files and Directories
          8. Moving Objects
          9. Transforming Data Formats
          10. Creating and Removing Directories
          11. Removing Objects
        3. Where Are Those Files?
          1. Locating Files with Locate
          2. Finding Files
          3. Which Command Will Run?
          4. Researching a Command
          5. Linking Files
          6. Note
        4. Backup Commands
          1. Using tar
          2. Taking Pity on the Unarchiver
          3. Compression Utilities
        5. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    19. Chapter 6. Text Processing/Advanced Command Line
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Working with Input/Output Streams
          1. Standard In
          2. Standard Out
          3. Standard Error
          4. Redirection of Streams
          5. Note
          6. Redirecting Standard Input
          7. Redirecting Standard Output
          8. Redirecting Standard Error
          9. Redirection Redux
        2. Pipes
          1. Note
        3. Executing Multiple Commands
          1. Multiple Command Operators
          2. Command Substitution
        4. Splitting and Processing Streams
          1. Splitting Streams with the tee Command
          2. Processing Output with the xargs Command
          3. Note
          4. Note
        5. Filters
          1. Sorting
          2. Numbering Lines
          3. Note
          4. Note
          5. Tabs
          6. Note
          7. Cutting Columns
          8. Pasting and Joining
          9. Unique Data
          10. Note
          11. Heads or Tails?
          12. Splitting Files
          13. Note
          14. When cat Goes Backward
          15. Viewing Binary Files Safely
          16. Note
        6. Formatting Commands
          1. Translating Files
          2. Note
          3. He sed, She sed
          4. Getting a grep
          5. Note
          6. Note
          7. Expanding grep with egrep and fgrep
        7. Using Regular Expressions and grep
        8. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    20. Chapter 7. Process Management
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Managing Processes
          1. Viewing Processes
          2. What’s the Diff?
          3. Note
          4. The free Command
          5. Blocks and Buffers
          6. Pages, Slabs, and Caches
          7. Interpreting Displayed Information from free
          8. Note
          9. System Uptime
          10. Note
        2. Sending Signals to Processes
          1. Killing Processes by PID
          2. Killing Processes by Other Criteria
          3. Note
        3. Job Control
          1. Note
        4. Managing Process Priorities
          1. Note
        5. Leaving Programs Running after Logout
          1. Using screen for Multiple Console Sessions
          2. Note
          3. Note
          4. Note
        6. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    21. Chapter 8. Editing Text
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. A Tour of the vim Editor
          1. The Message Line
          2. Editing in vi
          3. Tip
          4. Note
          5. Note
          6. Note
          7. Searching in vi
          8. Options in vi
          9. Tip
          10. Advanced vi
          11. Note
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Review Questions
    22. Chapter 9. Partitions and Filesystems
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Creating Partitions
          1. Partitions
          2. Swap
          3. Disk Partitioning Tools
          4. Note
        2. Filesystems
          1. Filesystem Types
          2. Superblocks
          3. Inodes and Files
          4. Inodes and Directories
          5. Inodes and Disk Space
          6. Creating Filesystems
          7. Advanced Filesystem Commands
          8. Note
          9. The Filesystem Table
        3. Space Utilization
          1. Using du
          2. Using df
          3. Using Disk Quotas
        4. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    23. Chapter 10. Permissions and Ownership
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Working with Permissions
          1. Permission Trio Bits
        2. Manipulating Permissions
          1. Numeric Mode
        3. Special File Permissions
          1. Special Bit Permissions
          2. Setting the SUID Bit on Files
          3. Setting the SGID Bit on Files
          4. Note
          5. Setting the SGID Bit on Directories
          6. Setting the Sticky Bit
        4. Finding Files by Permission
        5. Default Permissions
        6. Changing User Ownership
        7. Changing Group Ownership
          1. Note
        8. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    24. Chapter 11. Customizing Shell Environments
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Working Within the Shell
          1. Environment Variables
          2. Variable Scope
          3. Setting and Unsetting Variables
          4. Subshells
        2. Extending the Shell
          1. Global and User Settings
          2. Note
          3. The PATH
          4. PS1
          5. Note
          6. Creating New Users (skeleton)
        3. Localization and Internationalization
          1. Time Zones
          2. Character Encoding
          3. Representing Locales
          4. Contents of a Locale
          5. How Linux Uses the Locale
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    25. Chapter 12. Shell Scripting
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Basics of Scripting
          1. Running a Script
          2. Good Design
          3. Managing Your Scripts
        2. Shell Script Commands
          1. Use the Output of Another Command
          2. Do Math
          3. Conditions
          4. Testing Files
          5. An Easier Test Syntax
          6. Testing Strings
          7. Testing Integers
          8. Combining Multiple Tests
          9. Case Statements
          10. Loops
          11. Interacting with Other Programs
          12. Returning an Error Code
          13. Accepting Arguments
          14. Transferring Control to Another Program
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    26. Chapter 13. Basic SQL Management
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Database Basics
          1. Types of Databases
        2. Learning SQL
          1. Using SQLite
          2. SQL Basics
          3. Selecting Data
          4. Limiting Results
          5. Working with Multiple Tables
          6. Advanced Joins
          7. Subselects
          8. Grouping Data
          9. Inserting Data
          10. Updating Data
          11. Deleting Data
          12. Creating Tables
        3. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    27. Chapter 14. Configuring User Interfaces and Desktops
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Quick Overview of X
          1. How X Works
        2. The Xorg System
          1. The Xorg Configuration File
          2. Note
          3. Fonts in X
          4. Tuning X
          5. Note
        3. X Display Managers
        4. Into and Out of X
        5. Accessibility Options
          1. Sticky/Repeat Keys
          2. Slow/Bounce/Toggle Keys
          3. Mouse Keys
          4. High Contrast/Large Print Desktop Themes
          5. Screen Reader
          6. Braille Display
          7. Screen Magnifier
          8. Onscreen Keyboard
        6. Remote Clients
        7. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    28. Chapter 15. Managing Users and Groups
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. User Account Fundamentals
          1. What Accounts Are What?
          2. Note
          3. Note
          4. Note
        2. Group Accounts
          1. Note
          2. Group Entries in /etc/group
          3. Group Passwords
        3. Adding Users and Groups
          1. Adding Users with useradd
          2. The useradd Defaults
          3. Adding Groups with groupadd
        4. Modifying Users and Groups
          1. Modifying User Accounts with usermod
          2. Note
          3. Modifying Groups with groupmod
        5. Removing Users and Groups
          1. Removing Users
          2. Removing Groups
          3. Note
        6. The Shadow Suite
          1. Encrypted Passwords and Shadow Fields
          2. shadow File Permissions
          3. Note
        7. Changing Accounts
          1. Aging Passwords
          2. User Variables
          3. Note
        8. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    29. Chapter 16. Schedule and Automate Tasks
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. The Cron System
          1. Configuring crontabs
          2. Note
          3. Other Files
          4. Restricting Access
        2. Anacron
        3. Running Ad-hoc Jobs
          1. The at Command
          2. The batch Command
        4. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    30. Chapter 17. Configuring Print and Email Services
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Managing Printers and Printing
          1. The Print Spooler
          2. The CUPS Daemon
          3. Configuring CUPS
          4. CUPS Maintenance
          5. Command Line Tools
          6. Note
          7. Troubleshooting Printing
        2. Mail Transfer Agent Basics
          1. How Email Flows
          2. Creating Aliases and Forwarding Email
          3. Managing Queues
        3. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    31. Chapter 18. Logging and Time Services
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Maintain System Time
          1. Not One, But Two Clocks
          2. Working with the System Clock
          3. Working with the Hardware Clock
          4. Network Time Protocol
        2. System Logging
          1. systemd and syslog
          2. systemd Logging
        3. Rotating Logs
          1. Configuring Log Rotation
          2. Dealing with Open Files
        4. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    32. Chapter 19. Networking Fundamentals
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Conceptual Overview of Networking
          1. Necessary Configuration Information
          2. IP Addresses
          3. Networks and Hosts
          4. Address Class Ranges
          5. Network Masks
          6. Using Default Network Masks
          7. Gateway Addresses, or “Do I Dial with the Area Code?”
          8. Broadcast Addresses
          9. Custom Network Masks
          10. Determining a Custom Network Mask
          11. Additional Protocols
          12. IPv6
        2. Managing Interfaces
          1. Viewing IP Information
          2. Red Hat Interface Configuration
          3. Debian Interface Configuration
          4. Viewing and Configuring Gateway Addresses
        3. Network Configuration Utilities
          1. Network Utility Examples
          2. Note
          3. Note
          4. Note
          5. Note
        4. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    33. Chapter 20. System Security
      1. “Do I Know This Already?” Quiz
      2. Foundation Topics
        1. Gaining Access to the root Account
          1. The su Command
          2. The sudo Command
          3. Note
        2. Providing Services on Demand
          1. Using inetd and xinetd
          2. Note
          3. inetd Configuration Files
          4. xinetd Configuration Files
        3. Using TCP Wrappers for Securing Services
          1. inetd and TCP Wrappers
          2. xinetd and TCP Wrappers
          3. The hosts.allow and hosts.deny Files
          4. Wrapper Read Order
          5. Format of hosts.allow and hosts.deny
          6. Sample Configurations
          7. Using Rule Options
        4. Understanding Permission Problems
          1. Finding Files by Permissions
        5. GnuPG Keys
        6. Secure Shell
          1. SSH Components
          2. Note
        7. Additional Security Features
        8. Summary
      3. Exam Preparation Tasks
        1. Review All Key Topics
        2. Define Key Terms
        3. Review Questions
    34. Chapter 21. Final Preparation
      1. Foundation Topics
        1. How to Prepare for the LPI Exams
          1. Caveat and Warning
          2. Exam Objectives
          3. Important Exam Facts
          4. Right Before Your Exam Starts
          5. How to Look at the Objectives
          6. Studying for the Exams—What to Do
          7. Machines or Virtual Machines?
          8. Studying for the Exams—What Not to Do
          9. Don’t Believe Everything
          10. Don’t Worry, Be Happy
          11. LPI Certifications and Distributions
          12. You Have to Install Something
          13. LPI Exam Question Types
          14. Single Answer Multiple Choice
          15. Choose Two/Choose Three
          16. Choose All That Apply
          17. Fill in the Blank
          18. Final Recommendations
        2. Summary
    35. Appendix A. Answers to the “Do I Know This Already?” Quizzes and Review Questions
      1. Chapter 1
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      2. Chapter 2
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      3. Chapter 3
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      4. Chapter 4
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      5. Chapter 5
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      6. Chapter 6
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      7. Chapter 7
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      8. Chapter 8
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      9. Chapter 9
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      10. Chapter 10
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      11. Chapter 11
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      12. Chapter 12
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      13. Chapter 13
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      14. Chapter 14
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      15. Chapter 15
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      16. Chapter 16
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      17. Chapter 17
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      18. Chapter 18
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      19. Chapter 19
        1. “Do I Know This Already?” Quiz
        2. Review Questions
      20. Chapter 20
        1. “Do I Know This Already?” Quiz
        2. Review Questions
    36. Glossary
    37. Index
    38. Appendix B. Study Planner
    39. Where are the Companion Content Files?
    40. Code Snippets