A Comprehensive Guide for Administrators, Developers, and DevOps Engineers
Introduction: Why FreeBSD?
- The Moment You Meet FreeBSD
- What This Book Will Teach You
- A Different Development Model: Coherent System vs Integrated Ecosystem
- When FreeBSD Makes Sense (and When It Does Not)
- How to Use This Book
Chapter 1: History and Philosophy of BSD
- From PDP-11 to Berkeley: The Birth of UNIX at UC Berkeley
- The First BSD License Wars: AT&T vs BSDi
- Four Branches: FreeBSD, OpenBSD, NetBSD, and DragonFly
- Coherent System Design: Why Integration Matters
- Permissive Licensing and the Commercial BSD Story
- How This History Still Shapes FreeBSD Today
Chapter 2: Architecture and Kernel Design
- The FreeBSD System Model: Base System, Kernel, Userspace
- Kernel Architecture: Monolithic with Extensibility
- Syscall Interface and ABI Stability Guarantees
- Device Drivers: Everything In-Tree, Everything Tested Together
- Comparison with Linux Kernel Design Choices
- Understanding /boot/kernel and Loadable Kernel Modules
Chapter 3: Release Model, Installation, and Getting Started
- STABLE vs CURRENT vs RELEASE: Choosing Your Branch
- Point Releases and Security Advisories
- How This Compares to Linux Distribution Models
- Installation Methods: USB, Virtual Machines, Cloud Images
- The Installer Walkthrough: Partitioning and Configuration
- First Boot Essentials: Networking, SSH, Updates
Chapter 4: Filesystem Hierarchy, Users, and Permissions
- The FreeBSD Filesystem Hierarchy vs FHS
- Why /usr Lives Where It Does (and What That Means)
- User and Group Management with pw
- sudo Configuration and Privilege Escalation Patterns
- Permissions, ACLs, and POSIX Capabilities
- Security Modules: MAC Framework vs SELinux/AppArmor
Chapter 5: Package Management: pkg and the Ports Collection
- Two Systems: Binary Packages with pkg and the Ports Collection
- Comparing pkg to apt, dnf, pacman, and yum
- Installing, Querying, and Managing Packages
- Updating Packages vs Upgrading the Base System
- Building from Ports: When and How
- Mirrors, Custom Repositories, and Enterprise Package Management
Chapter 6: System Initialization and Service Management
- The rc.d Framework: How FreeBSD Starts Services
- /etc/rc.conf: The Master Configuration File
- Enabling, Disabling, and Managing Services at Boot
- Writing Custom rc Scripts: Variables and Conventions
- Logging: syslog-ng vs rsyslog and journald
- Migrating from systemd: Mapping Concepts and Patterns
Chapter 7: Networking and the PF Firewall
- Network Interface Configuration: ifconfig and netif.conf
- Routing, DNS Resolution, and DHCP in FreeBSD
- Bridging, VLANs, and Advanced Topologies
- Introducing PF: Philosophy and Syntax
- Writing Production PF Rulesets with Examples
- Migrating from iptables and nftables to PF
Chapter 8: Storage and Filesystems: UFS and ZFS
- Disk Management: gpart vs fdisk and parted
- UFS: The Traditional FreeBSD Filesystem
- ZFS Fundamentals: Pools, Vdevs, and Datasets
- ZFS Features: Snapshots, Replication, Compression, Encryption
- Performance Tuning: ARC, L2ARC, SLOG, and Cache Behavior
- Choosing Between UFS and ZFS for Your Workload
Chapter 9: Jails and Containers
- What Jails Are: Shared Kernel, Isolated Userspace
- Creating and Managing Jails: Service Mode and CLI
- Networking Options: Shared IP vs vnet
- Resource Limits and Security Hardening Inside Jails
- Jail Management Tools: iocage and Alternatives
- Jails vs Docker and LXC: When to Use Which
Chapter 10: Virtualization with bhyve
- bhyve Architecture: Lightweight Hypervisor Design
- Creating Virtual Machines: CPU, Memory, and Disks
- Networking VMs: Bridges, Tap Devices, and NAT
- Disk Management with ZVOLs and Raw Images
- Snapshots, Backups, and Live Migration Considerations
- bhyve vs KVM/QEMU: Performance and Feature Comparison
Chapter 11: Security Hardening
- The TrustedBSD Project: Foundations of FreeBSD Security
- Mandatory Access Control (MAC) Framework Overview
- Capsicum Capabilities and Application Sandboxing
- SSH Hardening and Network Stack DoS Resistance
- Audit Framework and Log-Based Monitoring
- Vulnerability Management: Advisories, Errata, and Patching
Chapter 12: Performance Tuning and System Monitoring
- The FreeBSD Performance Toolkit: vmstat, systat, dtrace
- Kernel Tuning Parameters: loader.conf and sysctl
- Memory Management and Page Cache Optimization
- Network Stack Performance: Buffers, Queues, and NIC Tuning
- Filesystem Performance: ZFS ARC and UFS Softupdates
- Building Production Monitoring Stacks on FreeBSD
Chapter 13: Development, Shell Environments, and Toolchains
- Shell Environments: sh, csh, tcsh, zsh on FreeBSD
- Installing Development Toolchains and Languages
- Building Software from Ports vs Packages
- Compiler Toolchain: clang, llvm, and GCC Support
- Python, Ruby, Node.js, and Modern Development Ecosystems
- CI/CD Integration and Automated Testing on FreeBSD
Chapter 14: Linux Compatibility and Migration Strategies
- The Linuxulator: Running Linux Binaries on FreeBSD
- Application Equivalents: Mapping Linux Tools to FreeBSD
- Migrating Web Servers and Application Stacks
- Database Migration: PostgreSQL, MySQL, and MariaDB
- Desktop Migration: From GNOME/KDE Plasma to FreeBSD
- Enterprise Migration Planning: Assessment, Staging, Rollback
Chapter 15: Enterprise Deployment, Cloud, and High Availability
- FreeBSD on Cloud Platforms: AWS, Azure, GCP, and OpenStack
- High Availability with CARP Failover Clustering
- Firewall HA: pfsync and State Synchronization
- Data Redundancy: ZFS Replication for Disaster Recovery
- Configuration Management: Ansible, Puppet, and Chef on FreeBSD
- Backup Strategies for Production FreeBSD Environments
Chapter 16: Troubleshooting, Disaster Recovery, and Production Best Practices
- Boot Troubleshooting: Single-User Mode and Recovery
- Analyzing Crash Dumps with gdb and kgdb
- Filesystem Repair: fsck for UFS and ZFS Scrub
- Network Troubleshooting Methodology and Tools
- Performance Debugging with dtrace in Production
- Production Best Practices: Documentation, Change Management, and Monitoring