Linux
Beginner or expert, professional or hobbyist, this is the Linux guide you need! Install Linux and walk through the basics: working in the terminal, handling files and directories, using Bash, and more. Then get into the nitty-gritty details of configuring your system and server, from compiling kernel modules to using tools like Apache, Postfix, and Samba. With information on backups, firewalls, virtualization, and more, you’ll learn everything there is to know about Linux!
- Your complete, cross-distribution, professional guide to Linux, for beginners and advanced users
- Get detailed instructions for installation, configuration, and administration, on both desktop and server
- Set up security, virtualization, and more
You'll learn about:
- The Basics:
Get to know the common distributions such as Ubuntu, Fedora, and RHEL so that you can configure your system the way you want it. Walk through your first steps in Linux and get comfortable using desktop environments such as KDE and GNOME.
- Server and Desktop Linus Systems:
Whether you want to use Linux on your workstation or are looking for a streamlined system for server use, this is your step-by-step guide! Learn about shells such as Bash or Zsh and access cloud systems with SSH and strong two-factor authentication.
- Security and Virtualization:
Implement Linux kernel security modules like SELinux and AppArmor, create backups, and configure firewalls. For virtualization, pair QEMU with KVM to run your virtual machine or install VirtualBox.
Key Highlights:
- Installation
- GNOME and KDE
- Bash, Vim, and Emacs
- Network configuration
- Software and package management
- Administration
- Kernel modules
- Apache
- Postfix and Dovecot
- Samba
- Security
- Virtualization
View Full Table of Contents
- Preface
- What This Book Can Do—and What It Can't
- How This Book Is Organized
- Formal Aspects
- Part I Installation
- 1 What Is Linux?
- 1.1 Introduction
- 1.2 Hardware Support
- 1.3 Distributions
- 1.3.1 Common Linux Distributions
- 1.4 Open-Source Licenses (GPL and Company)
- 1.4.1 Licensing Conflicts between Open- and Closed-Source Software
- 1.5 The History of Linux
- 2 Installation Basics
- 2.1 Requirements
- 2.2 BIOS and EFI
- 2.2.1 EFI System Partition
- 2.2.2 UEFI Secure Boot
- 2.3 Installation Variants
- 2.3.1 Installation Medium
- 2.3.2 Network Installation
- 2.3.3 Installation Program
- 2.3.4 Installation Location
- 2.4 Overview of the Installation Process
- 2.5 Partitioning Basics
- 2.5.1 MBR Basics
- 2.5.2 GPT Basics
- 2.5.3 Partition Names
- 2.5.4 File Systems
- 2.6 LVM and Encryption
- 2.6.1 Logical Volume Manager
- 2.6.2 Encryption
- 2.6.3 Limitations
- 2.6.4 Recommendation
- 2.7 Creating Linux Partitions
- 2.7.1 Number and Size of Linux Partitions
- 2.7.2 Which File System?
- 2.8 Setting the Scope of the Installation
- 2.9 Basic Configuration
- 2.10 System Changes, Extensions, and Updates
- 2.10.1 Software Installation and Package Management
- 2.10.2 Updates
- 2.10.3 Configuration
- 3 Installation Instructions
- 3.1 Debian
- 3.1.1 Installing Debian
- 3.1.2 Live-Image Installation
- 3.1.3 Standard Installation
- 3.1.4 Getting Started
- 3.2 Fedora
- 3.2.1 Installing Fedora
- 3.2.2 Getting Started
- 3.3 Linux Mint
- 3.4 Manjaro Linux
- 3.5 openSUSE
- 3.5.1 Installing openSUSE
- 3.5.2 Getting Started
- 3.6 Pop!_OS
- 3.6.1 Installing Pop!_OS
- 3.6.2 Getting Started
- 3.7 Ubuntu
- 3.7.1 Installing Ubuntu
- 3.7.2 Getting Started
- Part II Using Linux
- 4 GNOME
- 4.1 Personal Assessment
- 4.2 Getting Started
- 4.2.1 Panel
- 4.2.2 Activities
- 4.2.3 Dock (Dash)
- 4.2.4 Running Programs
- 4.2.5 Special Features of Keyboard, Mouse, and Touchpad
- 4.2.6 Using the Clipboard Efficiently
- 4.3 File Manager
- 4.3.1 Operation
- 4.3.2 Removable Media
- 4.3.3 Access to Network Directories
- 4.3.4 Sharing Network Directories
- 4.3.5 Plugins
- 4.3.6 Additional Programs
- 4.4 System Configuration
- 4.4.1 Mouse, Touchpad, and Keyboard
- 4.4.2 Network Configuration
- 4.4.3 Online Accounts
- 4.4.4 Printers
- 4.4.5 Monitor and Projector Configuration
- 4.4.6 High DPI Displays
- 4.4.7 Colors
- 4.4.8 User Administration
- 4.4.9 Software Installation and Updates
- 4.4.10 Remote Maintenance
- 4.5 Fonts
- 4.6 GNOME Tweak Tool
- 4.7 GNOME Shell Extensions
- 4.7.1 Useful Extensions
- 4.7.2 Tips and Tricks
- 4.8 GNOME Shell Themes
- 4.9 Internal Details of GNOME
- 4.9.1 XDG Directories and Scripts
- 4.10 GNOME Classic
- 5 KDE
- 5.1 Basic Principles
- 5.1.1 Terminology
- 5.1.2 Distributions
- 5.2 Operation
- 5.2.1 Important Plasmoids
- 5.3 File Manager
- 5.3.1 Renaming Files (KRename)
- 5.3.2 External Media and Network Directories
- 5.4 KDE Configuration
- Part III Linux Basics
- 6 Using the Terminal
- 6.1 Text Consoles and Terminal Windows
- 6.1.1 Terminal Window
- 6.1.2 Running Commands
- 6.2 Displaying and Editing Text Files
- 6.3 man and info
- 7 Bash (Shell)
- 7.1 What Is a Shell?
- 7.2 Configuration
- 7.3 Command Input
- 7.3.1 Expanding Command and File Names
- 7.3.2 Important Keyboard Shortcuts
- 7.3.3 Alias Abbreviations
- 7.4 Input and Output Redirection
- 7.4.1 Output Multiplication Using tee
- 7.5 Executing Commands
- 7.6 Globbing and Substitution/Expansion
- 7.6.1 Command Substitution
- 7.6.2 Single versus Double Quotation Marks
- 7.7 Variables
- 7.7.1 Environment Variables
- 7.7.2 Predefined Environment Variables
- 7.8 Bash Scripts
- 7.8.1 Example 1: grepall
- 7.8.2 Example 2: stripcomments
- 7.8.3 Example 3: applysedfile
- 7.8.4 Example 4: Backup Script
- 7.8.5 Example 5: Creating Thumbnails
- 7.8.6 Example 6: Setting Up Student Accounts
- 7.8.7 Example 7: Changing Multiple MySQL/MariaDB Databases
- 7.9 Basic Rules for Bash Scripts
- 7.10 Variables in Bash Scripts
- 7.10.1 The Scope of Variables
- 7.10.2 Variables Predefined by the Shell
- 7.10.3 Arrays
- 7.10.4 Parameter Substitution
- 7.10.5 Read Variables Using ""read""
- 7.11 Branches, Loops, and Functions
- 7.11.1 If Branches
- 7.11.2 Formulating Conditions
- 7.11.3 Case Branches
- 7.11.4 For Loops
- 7.11.5 While Loops
- 7.11.6 Until Loops
- 7.11.7 Functions
- 7.11.8 Heredoc Syntax
- 7.12 Important Special Characters in Bash: Quick Reference
- 8 Zsh (Shell)
- 8.1 Installation and Configuration
- 8.2 Usage
- 8.3 Oh My Zsh
- 9 Files and Directories
- 9.1 Handling Files and Directories
- 9.1.1 Directories
- 9.1.2 Elementary Commands for Editing Files and Directories
- 9.1.3 Determining Space Requirements of Files and Directories
- 9.1.4 Wildcard Characters
- 9.1.5 Complications with Using Wildcard Characters
- 9.1.6 Hidden Files and Directories
- 9.1.7 Special Types of Files (Links, Devices, and the Like)
- 9.2 Links
- 9.3 Finding Files (find, grep, and locate Commands)
- 9.3.1 which and whereis
- 9.3.2 locate
- 9.3.3 find and grep
- 9.4 Greater Convenience with Modern Commands
- 9.5 Access Rights, Users, and Group Membership
- 9.5.1 Access Rights for Files
- 9.5.2 Access Rights for Directories
- 9.6 Special Bits and the umask Setting
- 9.6.1 Setuid, Setgid, and Sticky Bit
- 9.6.2 Owner and Group of New Files
- 9.6.3 Access Bits of New Files (umask)
- 9.7 Access Control Lists and Extended Attributes
- 9.7.1 Access Control Lists
- 9.7.2 Extended Attributes
- 9.7.3 Capabilities
- 9.8 The Linux Directory Structure
- 9.9 Device Files
- 10 Process Management
- 10.1 Starting, Managing, and Stopping Processes
- 10.1.1 Launching Programs
- 10.1.2 Foreground and Background Processes
- 10.1.3 List of All Running Processes (ps and top)
- 10.1.4 Process Hierarchy
- 10.1.5 Terminating Processes by Force (kill and xkill)
- 10.1.6 Distribution of Compute Time (nice, renice, and ionice)
- 10.1.7 Input and Output Redirection and Pipes
- 10.2 Running Processes under a Different Identity (su)
- 10.3 Running Processes under a Different Identity (sudo)
- 10.3.1 sudo with Ubuntu
- 10.3.2 sudo with Raspberry Pi OS
- 10.3.3 sudo with Debian
- 10.3.4 sudo for RHEL and Fedora
- 10.3.5 sudo with SUSE
- 10.4 Running Processes under a Different Identity (PolicyKit)
- 10.5 System Processes (Daemons)
- 10.5.1 Kernel Threads
- 10.5.2 Starting and Stopping System Services
- 10.6 Starting Processes Automatically (Cron)
- 10.6.1 /etc/cron.hourly, .daily, .weekly, and .monthly
- 10.6.2 Anacron
- 10.7 Starting Processes Automatically (systemd Timer)
- 11 Network Tools
- 11.1 Determining the Network Status
- 11.2 Working on Other Computers (SSH)
- 11.2.1 Copying Files Securely Using scp
- 11.2.2 SSH Tunnel
- 11.2.3 SSH File System
- 11.2.4 telnet
- 11.3 Transferring Files (FTP and Others)
- 11.3.1 SFTP (Secure FTP)
- 11.3.2 wget
- 11.3.3 curl
- 11.3.4 lftp
- 11.3.5 rsync, mirror, and sitecopy
- 11.4 Lynx
- 11.5 Mutt
- Part IV Text and Code Editors
- 12 Vim
- 12.1 Quick Start
- 12.2 Cursor Movement
- 12.3 Editing Text
- 12.4 Search and Replace
- 12.5 Editing Multiple Files Simultaneously
- 12.6 Internal Details
- 12.7 Tips and Tricks
- 13 Emacs
- 13.1 Quick Start
- 13.1.1 Loading and Saving Texts and Exiting the Program
- 13.1.2 Online Help
- 13.1.3 Editing Modes
- 13.1.4 Keyboard
- 13.2 Cursor Movement
- 13.3 Editing Text
- 13.3.1 Tabs
- 13.3.2 Indenting and Outdenting Text Manually
- 13.3.3 Continuous Text
- 13.4 Search and Replace
- 13.4.1 Searching for Patterns (with Regular Expressions)
- 13.4.2 Search and Replace
- 13.5 Buffers and Windows
- 13.6 Special Editing Modes
- 13.7 Configuration
- 13.7.1 Setting the Font
- 13.7.2 Configuration at the Click of a Mouse
- 13.7.3 Manual Configuration Directly in .emacs
- 13.7.4 MELPA
- Part V System Configuration and Administration
- 14 Basic Configuration
- 14.1 Introduction
- 14.2 Configuration of the Text Consoles
- 14.2.1 Keyboard Layout
- 14.2.2 Font
- 14.3 Date and Time
- 14.4 Synchronizing Date and Time via NTP
- 14.4.1 The systemd-timesyncd Process (Debian, Raspberry Pi OS, and Ubuntu)
- 14.4.2 Chrony (Fedora, RHEL, and SUSE)
- 14.5 Users, Groups, and Passwords
- 14.5.1 User Management
- 14.5.2 Group Management
- 14.5.3 Passwords
- 14.5.4 Interaction of the Configuration Files
- 14.5.5 Network User Management
- 14.6 PAM, NSS, and Nscd
- 14.6.1 PAM
- 14.6.2 Name Service Switch
- 14.6.3 Name Service Caching Daemon
- 14.6.4 System Security Services Daemon
- 14.7 Language Setting, Internationalization, and Unicode
- 14.7.1 Setting the Localization and Character Set
- 14.7.2 “Cannot Set/Change Locale” Error Message
- 14.8 Hardware Reference
- 14.8.1 CPU and Memory
- 14.8.2 Power Management
- 14.8.3 Interfaces and Bus Systems
- 14.8.4 Bluetooth
- 14.8.5 Hotplug System
- 14.8.6 Audio System
- 14.9 CPU Tuning
- 14.9.1 Controlling the CPU Frequency
- 14.9.2 Monitoring the CPU Temperature
- 14.10 Notebook Optimization
- 14.10.1 powertop
- 14.10.2 TLP
- 14.10.3 Controlling the Battery-Charging Behavior
- 14.10.4 Fan Control
- 14.11 Printing System (CUPS)
- 14.11.1 Sequence of the Printing Process
- 14.11.2 Internal Details of CUPS
- 14.11.3 CUPS Web Interface
- 14.11.4 Administrating CUPS Using Commands
- 14.12 Logging (Syslog)
- 14.12.1 rsyslogd
- 14.12.2 Kernel Logging
- 14.12.3 System Startup Log
- 14.12.4 Logrotate
- 14.12.5 Logwatch
- 14.13 Logging (Journal)
- 14.13.1 journalctl
- 14.13.2 Configuration
- 14.14 Cockpit
- 14.14.1 Installation
- 14.14.2 Security Concerns
- 14.14.3 Configuration
- 14.14.4 Operation
- 15 Network Configuration
- 15.1 NetworkManager
- 15.1.1 Configuration
- 15.1.2 Virtual Private Networks
- 15.1.3 Proxy Configuration
- 15.1.4 Configuring NetworkManager in Text Mode
- 15.1.5 Internal Details
- 15.2 Manual LAN and Wi-Fi Configuration
- 15.2.1 Activating the LAN Controller Manually
- 15.2.2 Retrieving DHCP Information
- 15.2.3 IPv6 Configuration
- 15.2.4 Manual Control of the Wi-Fi Controller
- 15.2.5 Encrypting the Wireless Network
- 15.3 LAN Configuration Files
- 15.3.1 Basic Configuration
- 15.3.2 DNS Configuration (resolv.conf)
- 15.3.3 Host Name
- 15.3.4 Mappings between Controllers and Network Interfaces
- 15.4 Distribution-Specific Configuration Files
- 15.4.1 RHEL and Fedora (NetworkManager)
- 15.4.2 Debian
- 15.4.3 SUSE
- 15.4.4 Ubuntu
- 15.4.5 networkd (systemd)
- 15.5 Zeroconf and Avahi
- 16 Software and Package Management
- 16.1 Introduction
- 16.1.1 Disadvantages of Linux Package Management
- 16.1.2 New Concepts
- 16.2 RPM Package Management
- 16.2.1 Basic Principles
- 16.2.2 The rpm Command
- 16.3 DNF
- 16.3.1 Concept
- 16.3.2 Configuration
- 16.3.3 Searching, Installing, and Updating Packages
- 16.3.4 AppStream
- 16.3.5 Additional Functions
- 16.4 ZYpp
- 16.4.1 The zypper Command
- 16.5 Debian Package Management (dpkg)
- 16.6 APT
- 16.6.1 Configuration
- 16.6.2 apt Command
- 16.6.3 The apt-get Command
- 16.6.4 Additional APT Commands
- 16.6.5 Automating Updates
- 16.6.6 Synaptic
- 16.7 Pacman
- 16.8 PackageKit
- 16.9 Firmware, BIOS, and EFI Updates
- 16.9.1 fwupd and fwupdmgr
- 16.9.2 Internal Details of Microcode Updates
- 16.10 Managing Parallel Installations (Alternatives)
- 16.11 Flatpak and Snap
- 16.11.1 Flatpak
- 16.11.2 Snap
- 16.11.3 AppImages
- 16.12 Distribution-Specific Characteristics
- 16.12.1 Debian
- 16.12.2 Fedora
- 16.12.3 openSUSE
- 16.12.4 RHEL and Clones
- 16.12.5 Ubuntu
- 17 Graphics System
- 17.1 Basic Principles
- 17.1.1 The X Window System
- 17.1.2 Wayland
- 17.1.3 Wayland Limitations Compared to X
- 17.1.4 Glossary
- 17.2 Graphics Drivers
- 17.2.1 Drivers for AMD, Intel, and NVIDIA
- 17.2.2 Problems of Nonfree Drivers
- 17.3 NVIDIA Driver Installation
- 17.3.1 Operation and Configuration
- 17.4 Determining the Status of the Graphics System
- 17.5 Starting the Graphics System
- 17.5.1 Wayland or X?
- 17.5.2 The Role of the Display Manager
- 17.5.3 Configuring the Display Manager
- 17.5.4 Automatic Login
- 17.5.5 Monitor Configuration for gdm
- 18 File System Administration
- 18.1 How Everything Is Connected
- 18.2 Formatting and Using USB Media
- 18.2.1 Formatting a USB Flash Drive or SD Card
- 18.2.2 Mounting USB Media Manually
- 18.2.3 Mounting an External Hard Disk Automatically
- 18.3 Device Names for Hard Disks and Other Data Media
- 18.4 Partitioning the Hard Disk or SSD
- 18.4.1 MBR or GPT?
- 18.4.2 Basic Rules
- 18.5 The parted Command
- 18.5.1 Example 1 (MBR)
- 18.5.2 Example 2 (GPT)
- 18.6 Partitioning Tools with a Graphical User Interface
- 18.7 File System Types
- 18.8 mount, umount, and /etc/fstab
- 18.8.1 Determining the Current State of the File System
- 18.8.2 Mounting and Unmounting File Systems Manually (mount and umount)
- 18.8.3 Mounting File Systems Automatically (/etc/fstab)
- 18.8.4 The Syntax in /etc/fstab
- 18.8.5 Bind Mounts
- 18.8.6 Automatic Mounts without /etc/fstab
- 18.9 Basic Principles of File Systems
- 18.10 The ext File System (ext2, ext3, and ext4)
- 18.11 The btrfs File System
- 18.11.1 Administration
- 18.11.2 Deactivating Copy-On-Write
- 18.11.3 Compressing Files
- 18.11.4 Subvolumes
- 18.11.5 Snapshots
- 18.11.6 Distributing btrfs File Systems across Multiple Devices (RAID)
- 18.11.7 Determining the Use of a btrfs File System (df)
- 18.11.8 btrfs Configuration in openSUSE
- 18.11.9 btrfs Configuration in Fedora
- 18.12 The xfs File System
- 18.13 Windows File Systems (vfat and ntfs)
- 18.13.1 The VFAT File System
- 18.13.2 The NTFS File System
- 18.14 Swap Partitions and Files
- 18.15 RAID
- 18.15.1 Manual Configuration Using mdadm
- 18.15.2 Administration
- 18.15.3 Replacing a Defective RAID-1 Hard Disk
- 18.16 Logical Volume Manager
- 18.17 Self-Monitoring, Analysis, and Reporting Technology
- 18.18 SSD TRIM
- 18.19 Encryption
- 18.19.1 Encrypt Individual Files
- 18.19.2 Encrypting a File System
- 18.19.3 Encrypting the Entire System
- 18.19.4 Emergency Plan
- 19 Grand Unified Bootloader
- 19.1 Basic Principles of GRUB
- 19.1.1 EFI System Startup
- 19.1.2 UEFI Secure Boot
- 19.1.3 BIOS System Boot
- 19.1.4 The initrd Files
- 19.1.5 The Future of the Boot Process
- 19.2 Operating GRUB (User View)
- 19.3 GRUB Configuration
- 19.3.1 Automatic Generation of grub.cfg
- 19.3.2 Syntax and Internal Details
- 19.3.3 GRUB Menu Items
- 19.4 Manual GRUB Installation and First Aid
- 19.4.1 Manual Installation and First Aid for EFI PCs
- 19.4.2 Changing EFI Boot Entries and Settings (efibootmgr)
- 19.5 systemd-boot
- 19.5.1 Operation
- 19.5.2 Configuration
- 20 The Init System
- 20.1 systemd
- 20.1.1 Administration
- 20.1.2 Targets
- 20.1.3 Configuration
- 20.1.4 systemd at User Level
- 20.1.5 Additional Functions
- 20.1.6 Compatibility
- 20.1.7 Documentation
- 20.2 Custom systemd Services
- 20.2.1 Custom systemd Configuration File
- 20.2.2 Example 1: Setting up Docker Containers as a Service
- 20.2.3 Example 2: Logging the Computer Startup and Shutdown
- 20.3 Shutdown, Reboot, and Halt
- 20.4 The Traditional Init-V System
- 20.4.1 Runlevel
- 20.4.2 Init-V Scripts
- 20.4.3 Links in the Runlevel Directories
- 20.5 System Startup on Fedora and RHEL
- 20.6 System Startup on Debian, Raspberry Pi OS, and Ubuntu
- 20.7 System Startup on SUSE/openSUSE
- 21 Kernel and Modules
- 21.1 Kernel Modules
- 21.1.1 Commands for Module Management
- 21.1.2 Module Configuration
- 21.1.3 modprobe Syntax
- 21.2 Compiling Kernel Modules Yourself
- 21.2.1 Automating Module Updates
- 21.3 Configuring and Compiling the Kernel Yourself
- 21.3.1 Basic Principles
- 21.3.2 Installing the Kernel Code
- 21.3.3 Using Supplied Kernel Configuration Files
- 21.3.4 Configuring the Kernel Manually
- 21.3.5 Tools for a Manual Kernel Configuration
- 21.3.6 Compiling and Installing the Kernel
- 21.4 Kernel Live Patches
- 21.5 The /proc and /sys Directories
- 21.6 Kernel Boot Options
- 21.6.1 Important Kernel Boot Options
- 21.6.2 Symmetric Multiprocessing Options
- 21.6.3 Advanced Configuration and Power Interface Options
- 21.7 Changing Kernel Parameters
- 21.8 Spectre, Meltdown, and Others
- Part VI Server Configuration
- 22 Server Installation
- 22.1 Basic Principles
- 22.1.1 Installation Method
- 22.1.2 Host Name
- 22.1.3 RAID/LVM Setup
- 22.1.4 Improving Reliability
- 22.2 Red Hat Enterprise Linux
- 22.2.1 CentOS
- 22.2.2 AlmaLinux, Oracle Linux, and Rocky Linux
- 22.2.3 Distribution Change on the Fly
- 22.2.4 RHEL versus Clones
- 22.2.5 Installation
- 22.2.6 Registering the RHEL Installation
- 22.3 Ubuntu Server
- 22.3.1 Installing Ubuntu Server
- 22.4 Debian Server Installation
- 22.5 Elastic Compute Cloud
- 22.5.1 Amazon EC2
- 22.5.2 Costs
- 22.5.3 Getting Started
- 22.5.4 Setting Up the First Instance
- 22.5.5 SSH Access
- 22.5.6 EC2 Administration
- 22.5.7 Network Configuration
- 22.5.8 Amazon Linux
- 22.5.9 Internal Details
- 23 Secure Shell (SSH)
- 23.1 Installation
- 23.2 Configuration and Security
- 23.3 Fail2Ban
- 23.4 Authentication with Keys
- 23.5 Two-Factor Authentication
- 23.5.1 2FA with Google Authenticator
- 23.5.2 2FA with YubiKey
- 23.6 Additional Tools
- 23.6.1 Cluster SSH
- 23.6.2 Parallel SSH
- 23.6.3 Mosh
- 23.6.4 screen
- 24 Apache
- 24.1 Apache
- 24.1.1 Configuration
- 24.1.2 Default Character Set
- 24.1.3 Logrotate
- 24.2 Encrypted Connections (HTTPS)
- 24.2.1 Certificates
- 24.2.2 Using Self-Signed Certificates
- 24.2.3 Apache Configuration for HTTPS Operation
- 24.2.4 Snake-Oil Certificates
- 24.3 Let's Encrypt
- 24.3.1 Installing acme.sh
- 24.3.2 Applying acme.sh
- 24.3.3 SSL Settings
- 24.4 Setting Up and Securing Web Directories
- 24.4.1 Host Configuration
- 24.4.2 Directory Configuration
- 24.4.3 Securing Directories
- 24.4.4 Password Protection for Web Directories
- 24.5 Virtual Hosts
- 24.5.1 Setting Up Virtual Hosts
- 24.6 Web Access Statistics
- 24.7 PHP
- 24.8 NGINX
- 25 MySQL and MariaDB
- 25.1 Installation and Commissioning
- 25.1.1 Access Protection
- 25.1.2 Securing MySQL/MariaDB
- 25.1.3 Checking the Protection
- 25.1.4 Setting Up New Users
- 25.1.5 First Tests
- 25.2 Administration Tools
- 25.2.1 mysql
- 25.2.2 mysqladmin
- 25.2.3 MySQL Workbench
- 25.2.4 phpMyAdmin
- 25.3 Backups
- 25.3.1 mysqldump
- 25.3.2 Backup Tools and Variants
- 25.4 Installing WordPress
- 26 Postfix and Dovecot
- 26.1 Introduction and Basic Principles
- 26.1.1 Components of an Email Server
- 26.1.2 Protocols and Ports
- 26.1.3 The Message Flow in Detail
- 26.1.4 Variants and Options
- 26.1.5 DNS Configuration
- 26.1.6 Reverse DNS Entry
- 26.2 Postfix (MTA)
- 26.2.1 Installation on Debian and Ubuntu
- 26.2.2 Installation on EHEL
- 26.2.3 Configuration
- 26.2.4 main.cf
- 26.2.5 Changes to the Configuration
- 26.2.6 Opening Port 587
- 26.2.7 Logging and Administration
- 26.3 Postfix Encryption (TLS/STARTTLS)
- 26.3.1 Sample Configuration and Keywords
- 26.3.2 Setting Up Custom Certificates
- 26.4 Postfix Accounts
- 26.4.1 mbox or maildir Format
- 26.4.2 Mail Aliases
- 26.4.3 Explicit Recipients List
- 26.4.4 Email Addresses Differing from the Linux Account
- 26.4.5 Virtual Domains with Shared Email Users
- 26.4.6 Virtual Domains with Separate Email Users
- 26.4.7 Virtual Domains with Virtual Mailboxes
- 26.4.8 Disabling the Address Verification (VRFY)
- 26.5 Dovecot (POP and IMAP Server)
- 26.5.1 Operation as POP or IMAP Server
- 26.5.2 SMTP Authentication for Postfix
- 26.6 Client Configuration
- 26.7 SpamAssassin
- 26.7.1 Automatically Moving Spam to the Junk Folder
- 26.8 ClamAV (Virus Protection)
- 26.9 SPF, DKIM, and DMARC
- 26.9.1 Sender Policy Framework
- 26.9.2 DomainKeys Identified Mail
- 26.9.3 OpenDKIM
- 26.9.4 Postfix Configuration for OpenDKIM
- 26.9.5 Domain-Based Message Authentication, Reporting, and Conformance
- 26.10 Configuration Test and Troubleshooting
- 27 Samba
- 27.1 Basic Principles and Terminology
- 27.1.1 Access Rights and Security Systems
- 27.1.2 Centralized or Decentralized Server Topology?
- 27.1.3 NAS Instead of Tinkering with Samba?
- 27.2 Basic Configuration and Commissioning
- 27.2.1 Configuration Changes and Status
- 27.2.2 Firewall
- 27.2.3 Securing Samba
- 27.2.4 Logging
- 27.2.5 WS-Discovery (wsdd and wsdd2)
- 27.3 Password Management
- 27.3.1 Samba Passwords
- 27.3.2 Synchronizing Samba and Linux Passwords
- 27.3.3 Mapping of Windows and Linux User Names
- 27.3.4 Putting It All Together
- 27.3.5 Working Techniques
- 27.4 Network Directories
- 27.4.1 Sharing Network Directories in GNOME and KDE
- 27.5 Example: Home and Media Server
- 27.6 Example: Company Server
- 27.7 SMB Client Access
- 27.7.1 Using Desktop Systems
- 27.7.2 Finding a Samba Server Using nmblookup
- 27.7.3 Access to Network Directories Using smbclient
- 27.7.4 CIFS-mount
- Part VII Security
- 28 Backups
- 28.1 Déjà Dup
- 28.1.1 Configuration and Use
- 28.1.2 Restoring Data
- 28.2 Back In Time
- 28.2.1 Configuration and Use
- 28.2.2 Restoring Data
- 28.3 Grsync
- 28.3.1 Configuration and Use
- 28.4 Borg Backup
- 28.4.1 Installation
- 28.4.2 Usage
- 28.4.3 Borg Backup in Scripts
- 28.4.4 Borg Backup Using SSH
- 28.4.5 Internal Details
- 28.4.6 Borg User Interfaces
- 28.5 Compressing and Archiving Files
- 28.5.1 Compressing Files (gzip, bzip2, xz, and lzop)
- 28.5.2 Creating Compressed Archives (tar and zip)
- 28.6 Synchronizing Directories (rsync)
- 28.7 Incremental Backups (rdiff-backup)
- 28.8 Incremental Backups (rsnapshot)
- 28.9 Backup Scripts
- 28.10 Backups to S3 Storage
- 28.10.1 Setting Up S3 Storage
- 28.10.2 The aws Command
- 28.10.3 Encryption and Example
- 29 Firewalls
- 29.1 Network Fundamentals and Analysis
- 29.2 Basic Protection of Network Services
- 29.2.1 The TCP Wrapper Library
- 29.2.2 Starting Network Services without root Privileges
- 29.2.3 Starting Network Services in a chroot Environment
- 29.3 Basic Firewall Principles
- 29.3.1 Netfilter and Nftables
- 29.4 Firewall Configuration Tools
- 29.4.1 Debian
- 29.4.2 Fedora and RHEL
- 29.4.3 firewall-cmd
- 29.4.4 SUSE
- 29.4.5 Ubuntu
- 29.5 Custom Firewall Built Using nft
- 29.5.1 Nftables: Basic Principles
- 29.5.2 Defining Rules
- 29.5.3 Syntax for Firewall Rules
- 29.5.4 Simple Protection of a Web Server
- 29.5.5 More Examples
- 30 SELinux and AppArmor
- 30.1 SELinux
- 30.1.1 Internal Workings of SELinux and Usage
- 30.2 AppArmor
- 30.2.1 AppArmor on Debian and Ubuntu
- 30.2.2 AppArmor on SUSE
- Part VIII Virtualization
- 31 VirtualBox
- 31.1 Installing VirtualBox
- 31.1.1 VirtualBox Packages of your Distribution
- 31.1.2 VirtualBox Packages from Oracle
- 31.1.3 Preparation Tasks
- 31.1.4 Installing VirtualBox on Windows or macOS
- 31.2 Setting Up VirtualBox Machines
- 31.2.1 Setting Up a Linux Virtual Machine
- 31.2.2 Installing Guest Additions
- 31.2.3 Setting Up a Windows Virtual Machine
- 31.3 Working Techniques and Configuration Tips
- 31.3.1 Network Configuration
- 31.3.2 SSH Access via Port Forwarding
- 31.3.3 Data Exchange via the Clipboard
- 31.3.4 Exchanging Data with a Shared Folder
- 31.3.5 USB Devices in Virtual Machines
- 31.3.6 Exporting/Importing Virtual Machines
- 31.3.7 Grouping Virtual Machines and Running Them Invisibly
- 31.3.8 Using VirtualBox with a High-Resolution Monitor
- 31.3.9 Controlling VirtualBox by Command (vboxmanage)
- 31.3.10 Enlarging Virtual Hard Disks
- 32 QEMU and Kernel-Based Virtual Machine
- 32.1 Basic Principles
- 32.1.1 Internal Workings of libvirt
- 32.1.2 Behavior when Rebooting the Host System
- 32.1.3 Virtual Hardware
- 32.2 Virtual Machine Manager
- 32.2.1 Setting Up a New Virtual Machine
- 32.2.2 Stopping Virtual Machines
- 32.2.3 Windows Installation
- 32.3 libvirt Commands
- 32.3.1 virsh
- 32.3.2 virt-clone
- 32.3.3 virt-sysprep
- 32.3.4 virt-viewer
- 32.3.5 virt-top
- 32.4 Integrating Virtual Machines into the LAN (Network Bridge)
- 32.4.1 Configuring the Network Bridge on the Host Computer
- 32.4.2 IP Forwarding
- 32.4.3 Network Configuration on a Root Server
- 32.4.4 Configuring the Virtual Machine
- 32.4.5 MAC Trouble
- 32.5 Direct Access to the Contents of an Image File
- 32.5.1 Access to Partitioned RAW Images in the Host System
- 32.5.2 libguestfs Tools
- 32.5.3 Converting an Image Format
- 32.5.4 Enlarging an Image
- 32.5.5 Reducing an Image File
- 33 Windows Subsystem for Linux
- 33.1 Checking Out WSL
- 33.1.1 Using WSL
- 33.1.2 File System
- 33.1.3 Running Programs in Graphics Mode (WSLg)
- 33.2 WSL Network Integration
- 33.3 The wsl Command and WSL Configuration
- 33.3.1 Global WSL Configuration
- 33.3.2 Linux-Specific Configuration
- 33.3.3 Enlarging the WSL2 Disk
- The Author
- Index