Learning Modern Linux

Book description

If you use Linux in development or operations and need a structured approach to help you dive deeper, this book is for you. Author Michael Hausenblas also provides tips and tricks for improving your workflow with this open source operating system. Whether you're a developer, software architect, or site reliability engineer, this hands-on guide focuses on ways to use Linux for your everyday needs, from development to office-related tasks.

Along the way, you'll gain hands-on experience with modern Linux terminals and shells, and learn how to manage your workloads. You'll understand how to run Linux applications by using containers, systemd, modern filesystems, and immutable distros such as Flatcar and Bottlerocket.

  • Use Linux as a modern work environment, rather than just from an admin perspective
  • Learn critical components such as the Linux kernel, terminal multiplexer, human-friendly shells, and portable shell scripting
  • Become familiar with access control, from file permissions to capabilities, and understand the role of filesystems as a fundamental building block
  • Learn about application dependency management and containers
  • Gain hands-on experience with the Linux networking stack and tooling, including DNS
  • Apply modern operating system observability to manage your workloads
  • Become familiar with interprocess communication, virtual machines, and selected security topics

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. About You
    2. How to Use the Book
    3. Conventions
    4. Using Code Examples
    5. O’Reilly Online Learning
    6. How to Contact Us
    7. Acknowledgments
  2. 1. Introduction to Linux
    1. What Are Modern Environments?
    2. The Linux Story (So Far)
    3. Why an Operating System at All?
    4. Linux Distributions
    5. Resource Visibility
    6. A Ten-Thousand-Foot View of Linux
    7. Conclusion
  3. 2. The Linux Kernel
    1. Linux Architecture
    2. CPU Architectures
      1. x86 Architecture
      2. ARM Architecture
      3. RISC-V Architecture
    3. Kernel Components
      1. Process Management
      2. Memory Management
      3. Networking
      4. Filesystems
      5. Device Drivers
      6. syscalls
    4. Kernel Extensions
      1. Modules
      2. A Modern Way to Extend the Kernel: eBPF
    5. Conclusion
  4. 3. Shells and Scripting
    1. Basics
      1. Terminals
      2. Shells
      3. Modern Commands
      4. Common Tasks
    2. Human-Friendly Shells
      1. Fish Shell
      2. Z-shell
      3. Other Modern Shells
      4. Which Shell Should I Use?
    3. Terminal Multiplexer
      1. screen
      2. tmux
      3. Other Multiplexers
      4. Which Multiplexer Should I Use?
    4. Scripting
      1. Scripting Basics
      2. Writing Portable bash Scripts
      3. Linting and Testing Scripts
      4. End-to-End Example: GitHub User Info Script
    5. Conclusion
  5. 4. Access Control
    1. Basics
      1. Resources and Ownership
      2. Sandboxing
      3. Types of Access Control
    2. Users
      1. Managing Users Locally
      2. Centralized User Management
    3. Permissions
      1. File Permissions
      2. Process Permissions
    4. Advanced Permission Management
      1. Capabilities
      2. seccomp Profiles
      3. Access Control Lists
    5. Good Practices
    6. Conclusion
  6. 5. Filesystems
    1. Basics
    2. The Virtual File System
      1. Logical Volume Manager
      2. Filesystem Operations
      3. Common Filesystem Layouts
    3. Pseudo Filesystems
      1. procfs
      2. sysfs
      3. devfs
    4. Regular Files
      1. Common Filesystems
      2. In-Memory Filesystems
      3. Copy-on-Write Filesystems
    5. Conclusion
  7. 6. Applications, Package Management, and Containers
    1. Basics
    2. The Linux Startup Process
    3. systemd
      1. Units
      2. Management with systemctl
      3. Monitoring with journalctl
      4. Example: scheduling greeter
    4. Linux Application Supply Chains
    5. Packages and Package Managers
      1. RPM Package Manager
      2. Debian deb
      3. Language-Specific Package Managers
    6. Containers
      1. Linux Namespaces
      2. Linux cgroups
      3. Copy-on-Write Filesystems
      4. Docker
      5. Other Container Tooling
    7. Modern Package Managers
    8. Conclusion
  8. 7. Networking
    1. Basics
    2. The TCP/IP Stack
      1. The Link Layer
      2. The Internet Layer
      3. The Transport Layer
      4. Sockets
    3. DNS
      1. DNS Records
      2. DNS Lookups
    4. Application Layer Networking
      1. The Web
      2. Secure Shell
      3. File Transfer
      4. Network File System
      5. Sharing with Windows
    5. Advanced Network Topics
      1. whois
      2. Dynamic Host Configuration Protocol
      3. Network Time Protocol
      4. Wireshark and tshark
      5. Other Advanced Tooling
    6. Conclusion
  9. 8. Observability
    1. Basics
      1. Observability Strategy
      2. Terminology
      3. Signal Types
    2. Logging
      1. Syslog
      2. journalctl
    3. Monitoring
      1. Device I/O and Network Interfaces
      2. Integrated Performance Monitors
      3. Instrumentation
    4. Advanced Observability
      1. Tracing and Profiling
      2. Prometheus and Grafana
    5. Conclusion
  10. 9. Advanced Topics
    1. Interprocess Communication
      1. Signals
      2. Named Pipes
      3. UNIX Domain Sockets
    2. Virtual Machines
      1. Kernel-Based Virtual Machine
      2. Firecracker
    3. Modern Linux Distros
      1. Red Hat Enterprise Linux CoreOS
      2. Flatcar Container Linux
      3. Bottlerocket
      4. RancherOS
    4. Selected Security Topics
      1. Kerberos
      2. Pluggable Authentication Modules
    5. Other Modern and Future Offerings
      1. NixOS
      2. Linux on the Desktop
      3. Linux on Embedded Systems
      4. Linux in Cloud IDE
    6. Conclusion
  11. A. Helpful Recipes
    1. Gathering System Information
    2. Working with Users and Processes
    3. Gathering File Information
    4. Working with Files and Directories
    5. Working with Redirection and Pipes
    6. Working with Time and Dates
    7. Working with Git
    8. System Performance
  12. B. Modern Linux Tools
  13. Index
  14. About the Author

Product information

  • Title: Learning Modern Linux
  • Author(s): Michael Hausenblas
  • Release date: April 2022
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098108946