Linux for System Administrators

Book description

A modern guide for aspiring Linux administrators—from command line basics to enterprise features

Key Features

  • Explore a Linux environment with a focus on networking, installation, configuration, and cloud management
  • Become familiar with the command line, basic commands, and directory
  • Learn how to automate apps and infrastructure using Chef
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Linux system administration is an essential aspect of maintaining and managing Linux servers within an organization. The role of a Linux system administrator is pivotal in ensuring the smooth functioning and security of these servers, making it a critical job function for any company that relies on Linux infrastructure.

This book is a comprehensive guide designed to help you build a solid foundation in Linux system administration. It takes you from the fundamentals of Linux to more advanced topics, encompassing key areas such as Linux system installation, managing user accounts and filesystems, networking fundamentals, and Linux security techniques. Additionally, the book delves into the automation of applications and infrastructure using Chef, enabling you to streamline and optimize your operations.

For both newcomers getting started with Linux and professionals looking to enhance their skills, this book is an invaluable hands-on guide with a structured approach and concise explanations that make it an effective resource for quickly acquiring and reinforcing Linux system administration skills. With the help of this Linux book, you’ll be able to navigate the world of Linux administration confidently to meet the demands of your role.

What you will learn

  • Master the use of the command line and adeptly manage software packages
  • Manage users and groups locally or by using centralized authentication
  • Set up, diagnose, and troubleshoot Linux networks
  • Understand how to choose and manage storage devices and filesystems
  • Implement enterprise features such as high availability and automation tools
  • Pick up the skills to keep your Linux system secure

Who this book is for

This book is for anyone new to the IT sector or those looking to learn Linux for a career in administering Linux systems. Aspiring cloud professionals, helpdesk staff, application support engineers, application developers, researchers, educators, and students considering the use of Linux servers will find this book especially useful.

Table of contents

  1. Linux for System Administrators
  2. Contributors
  3. About the authors
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Conventions used
    5. Get in touch
    6. Share Your Thoughts
    7. Download a free PDF copy of this book
  6. Part 1: Linux Basics
  7. Chapter 1: Getting to Know Linux
    1. The structure of a Linux system
      1. The Linux kernel and Linux-based operating systems
      2. Kernel versus user space
      3. The Linux kernel and the GNU project
    2. Open source software licenses
      1. Permissive and copyleft licenses
      2. Patent grant, tivoization, and SaaS concerns
    3. Linux distributions
      1. Package managers and package repositories
      2. Differences between distributions
    4. Linux usage in the modern world
    5. Summary
  8. Chapter 2: The Shell and Its Commands
    1. What is a shell?
    2. Basic shell commands
    3. Intermediate shell commands
    4. Summary
  9. Chapter 3: The Linux Filesystem
    1. What is a filesystem?
    2. High scalability
    3. High performance
      1. What filesystem does my system use?
    4. FUSE filesystem
    5. The directory tree and standard directories
    6. Links (hard and symbolic)
      1. What is an inode?
      2. What is a hard link?
      3. What are symbolic links?
    7. Mounting and unmounting filesystems
      1. How to unmount the filesystem
      2. Pseudo-filesystems
      3. Processes
      4. Kernel and system information
      5. CPU usage
    8. Summary
  10. Chapter 4: Processes and Process Control
    1. Executables versus processes
    2. Process termination and exit codes
      1. Exit codes
      2. Signals
      3. The kill command
    3. The process tree
    4. Process search and monitoring
      1. The ps command
      2. Process monitoring tools
      3. The /proc filesystem
    5. Summary
  11. Chapter 5: Hardware Discovery
    1. Discovering CPU model and features
      1. Feature discovery on different platforms
      2. The /proc/cpuinfo file
      3. Multi-processor systems
      4. High-level CPU discovery utilities
    2. Memory discovery
    3. Discovering PCI devices
    4. Discovering USB devices
    5. Discovering storage devices
    6. High-level discovery tools
      1. dmidecode
      2. lshw
    7. Summary
  12. Part 2: Configuring and Modifying Linux Systems
  13. Chapter 6: Basic System Settings
    1. Overview of basic settings
    2. The hosts configuration file
    3. The resolv configuration file
    4. The network-scripts configuration file
    5. The dhclient configuration file
    6. The sysctl configuration file
    7. Summary
  14. Chapter 7: User and Group Management
    1. Overview of managing accounts/groups
    2. How to add a new account
      1. Using useradd
      2. Using adduser
    3. How to delete an account
    4. Understanding the/etc/sudoers file
    5. Switching users
    6. Managing account passwords
      1. Locking/unlocking user accounts
      2. Setting password expiration
    7. Group management
    8. Permissions
    9. Changing groups
    10. Summary
  15. Chapter 8: Software Installation and Package Repositories
    1. Software installation, packages, and dependencies
    2. Package managers
    3. Package files
      1. Inspecting package files
      2. Inspecting installed packages
      3. Installing and removing package files
    4. Package repositories and high-level package managers
      1. Package repositories
      2. High-level package managers
      3. Searching for packages
    5. System upgrade
      1. Upgrading a system with YUM or DNF
      2. Upgrading a system with APT
    6. Summary
    7. Further reading
  16. Chapter 9: Network Configuration and Debugging
    1. Linux network stack
    2. Network interfaces and addresses in Linux
      1. Discovering physical network devices
      2. Network interface names
      3. Using the ip command
      4. Discovering and inspecting logical links
      5. Viewing and changing Ethernet link MAC addresses
      6. Viewing and changing IP addresses
    3. Routes and neighbor tables
      1. ARP and NDP neighbor tables
      2. Routes and route tables
    4. NetworkManager
    5. Distribution-specific configuration methods
      1. Debian
      2. Old Red Hat-based distributions
    6. Network troubleshooting
      1. Using ping
      2. Using traceroute
    7. Summary
  17. Chapter 10: Storage Management
    1. Adding additional storage volumes
    2. Formatting and partitioning storage devices
    3. Formatting a newly created partition
    4. Mounting and unmounting volumes
      1. Updating the /etc/fstab file
      2. Editing /etc/fstab file
    5. Utilizing LVM
    6. Getting started with LVM
      1. Creating a format for logical disks
      2. Deleting volumes with LVM
    7. Summary
  18. Part 3: Linux as a Part of a Larger System
  19. Chapter 11: Logging Configuration and Remote Logging
    1. Logging configuration
    2. How does log data get sent and gathered?
    3. Checking rsyslog service on all servers
    4. Configuring rsyslog for centralized logging
    5. Sending logs to a centralized rsyslog server
    6. Log rotation
    7. Journald
    8. DMESG
    9. Understanding the ring buffer in Linux
    10. Summary
  20. Chapter 12: Centralized Authentication
    1. The AAA framework
    2. Authentication mechanisms in Linux
      1. Information lookup
      2. Name Service Switch
    3. Pluggable Authentication Modules
      1. PAM configuration
      2. Limitations of PAM
    4. System Security Services Daemon
    5. Active Directory authentication with Samba 4
      1. Setting up the domain controller
      2. Setting up the client
    6. Summary
    7. Further reading
  21. Chapter 13: High Availability
    1. Types of redundancy and load balancing
      1. Link layer redundancy
      2. Network layer redundancy and load balancing
      3. Transport layer load balancing with LVS
      4. LVS load-balancing methods
      5. Saving and restoring LVS configurations
      6. Additional LVS options
    2. Active/backup configurations and load balancing with Keepalived
      1. Installing Keepalived
      2. Basics of the VRRP protocol operation
      3. Configuring VRRP
      4. Configuring virtual servers
    3. Application layer load balancing
      1. Web application load balancing with HAProxy
    4. Summary
    5. Further reading
  22. Chapter 14: Automation with Chef
    1. Overview of infrastructure automation
      1. Benefits of automation in Linux
    2. Introduction to Chef
      1. What is Chef?
      2. Key features of Chef
      3. Overview of Chef’s architecture
    3. Chef server
      1. Chef server components
      2. Cookbooks and recipes
    4. Chef workstation
      1. Development workflow
      2. Managing environments and roles
    5. Chef nodes
      1. Node registration
      2. Communication with the Chef server
    6. Cookbook development
      1. Cookbook structure and components
      2. Writing recipes and resources
    7. Managing infrastructure with Chef
      1. Configuration management
    8. Chef client-server interaction
      1. Reporting and monitoring
      2. Data synchronization
    9. Benefits of automating infrastructure with Chef in Linux
      1. Consistency and scalability
      2. Reduced human error
      3. Enhanced security
    10. Challenges and best practices
      1. Best practices for effective Chef implementation
    11. Summary
  23. Chapter 15: Security Guidelines and Best Practices
    1. Common threats and attack types
      1. The motivation of attackers and the possible consequences
      2. Information security properties and attacks on them
    2. Keeping your system secure
      1. Reducing the attack surface
      2. Compartmentalization and privilege separation
      3. Preventing credential theft and brute-force attacks
      4. Reducing the risk of software vulnerabilities
    3. Summary
    4. Further reading
  24. Index
    1. Why subscribe?
  25. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Linux for System Administrators
  • Author(s): Viorel Rudareanu, Daniil Baturin
  • Release date: September 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781803247946