FreeBSD Handbook
The FreeBSD Documentation Project
Copyright © 1995-2021 The FreeBSD Documentation Project
trademarks
[ Split HTML / Single HTML ]
Abstract
Welcome to FreeBSD! This handbook covers the installation and day to day use of FreeBSD 13.0-RELEASE, FreeBSD 12.2-RELEASE and FreeBSD 11.4-RELEASE. This book is the result of ongoing work by many individuals. Some sections might be outdated. Those interested in helping to update and expand this document should send email to the FreeBSD documentation project mailing list.
The latest version of this book is available from the FreeBSD web site. Previous versions can be obtained from https://docs.FreeBSD.org/doc/. The book can be downloaded in a variety of formats and compression options from the FreeBSD FTP server or one of the numerous mirror sites. Printed copies can be purchased at the FreeBSD Mall. Searches can be performed on the handbook and other documents on the search page.
Table of Contents
- Preface
- Part I. Getting Started
- Chapter 1. Introduction
- Chapter 2. Installing FreeBSD
- 2.1. Synopsis
- 2.2. Minimum Hardware Requirements
- 2.3. Pre-Installation Tasks
- 2.4. Starting the Installation
- 2.5. Using bsdinstall
- 2.6. Allocating Disk Space
- 2.7. Fetching Distribution Files
- 2.8. Accounts, Time Zone, Services and Hardening
- 2.9. Network Interfaces
- 2.10. Troubleshooting
- 2.11. Using the Live CD
- Chapter 3. FreeBSD basics
- 3.1. Synopsis
- 3.2. Virtual Consoles and Terminals
- 3.3. Users and Basic Account Management
- 3.4. Permissions
- 3.5. Directory Structure
- 3.6. Disk Organization
- 3.7. Mounting and Unmounting File Systems
- 3.8. Processes and Daemons
- 3.9. Shells
- 3.10. Text Editors
- 3.11. Devices and Device Nodes
- 3.12. Manual Pages
- Chapter 4. Installing Applications: Packages and Ports
- Chapter 5. The X Window System
- Part II. Common Tasks
- Part III. System Administration
- Chapter 12. Configuration and Tuning
- 12.1. Synopsis
- 12.2. Starting Services
- 12.3. Configuring cron(8)
- 12.4. Managing Services in FreeBSD
- 12.5. Setting Up Network Interface Cards
- 12.6. Virtual Hosts
- 12.7. Configuring System Logging
- 12.8. Configuration Files
- 12.9. Tuning with sysctl(8)
- 12.10. Tuning Disks
- 12.11. Tuning Kernel Limits
- 12.12. Adding Swap Space
- 12.13. Power and Resource Management
- Chapter 13. The FreeBSD Booting Process
- Chapter 14. Security
- 14.1. Synopsis
- 14.2. Introduction
- 14.3. One-time Passwords
- 14.4. TCP Wrapper
- 14.5. Kerberos
- 14.6. OpenSSL
- 14.7. VPN over IPsec
- 14.8. OpenSSH
- 14.9. Access Control Lists
- 14.10. Monitoring Third Party Security Issues
- 14.11. FreeBSD Security Advisories
- 14.12. Process Accounting
- 14.13. Resource Limits
- 14.14. Shared Administration with Sudo
- 14.15. Using doas as an alternative to sudo
- Chapter 15. Jails
- Chapter 16. Mandatory Access Control
- Chapter 17. Security Event Auditing
- Chapter 18. Storage
- 18.1. Synopsis
- 18.2. Adding Disks
- 18.3. Resizing and Growing Disks
- 18.4. USB Storage Devices
- 18.5. Creating and Using CD Media
- 18.6. Creating and Using DVD Media
- 18.7. Creating and Using Floppy Disks
- 18.8. Using NTFS Disks
- 18.9. Backup Basics
- 18.10. Memory Disks
- 18.11. File System Snapshots
- 18.12. Disk Quotas
- 18.13. Encrypting Disk Partitions
- 18.14. Encrypting Swap
- 18.15. Highly Available Storage (HAST)
- Chapter 19. GEOM: Modular Disk Transformation Framework
- Chapter 20. The Z File System (ZFS)
- Chapter 21. Other File Systems
- Chapter 22. Virtualization
- 22.1. Synopsis
- 22.2. FreeBSD as a Guest on Parallels for Mac OS® X
- 22.3. FreeBSD as a Guest on Virtual PC for Windows®
- 22.4. FreeBSD as a Guest on VMware Fusion for Mac OS®
- 22.5. FreeBSD as a Guest on VirtualBox™
- 22.6. FreeBSD as a Host with VirtualBox™
- 22.7. FreeBSD as a Host with bhyve
- 22.8. FreeBSD as a Xen™-Host
- Chapter 23. Localization - i18n/L10n Usage and Setup
- Chapter 24. Updating and Upgrading FreeBSD
- Chapter 25. DTrace
- Chapter 26. USB Device Mode / USB OTG
- Chapter 12. Configuration and Tuning
- Part IV. Network Communication
- Chapter 27. Serial Communications
- Chapter 28. PPP
- Chapter 29. Electronic Mail
- 29.1. Synopsis
- 29.2. Mail Components
- 29.3. Sendmail Configuration Files
- 29.4. Changing the Mail Transfer Agent
- 29.5. Troubleshooting
- 29.6. Advanced Topics
- 29.7. Setting Up to Send Only
- 29.8. Using Mail with a Dialup Connection
- 29.9. SMTP Authentication
- 29.10. Mail User Agents
- 29.11. Using fetchmail
- 29.12. Using procmail
- Chapter 30. Network Servers
- 30.1. Synopsis
- 30.2. The inetd Super-Server
- 30.3. Network File System (NFS)
- 30.4. Network Information System (NIS)
- 30.5. Lightweight Directory Access Protocol (LDAP)
- 30.6. Dynamic Host Configuration Protocol (DHCP)
- 30.7. Domain Name System (DNS)
- 30.8. Apache HTTP Server
- 30.9. File Transfer Protocol (FTP)
- 30.10. File and Print Services for Microsoft® Windows® Clients (Samba)
- 30.11. Clock Synchronization with NTP
- 30.12. iSCSI Initiator and Target Configuration
- Chapter 31. Firewalls
- Chapter 32. Advanced Networking
- Part V. Appendices
List of Figures
- 2.1 FreeBSD Boot Loader Menu
- 2.2 FreeBSD Boot Options Menu
- 2.3 Welcome Menu
- 2.4 Keymap Loading
- 2.5 Keymap Selection Menu
- 2.6 Keymap Testing Menu
- 2.7 Setting the Hostname
- 2.8 Selecting Components to Install
- 2.9 Installing from the Network
- 2.10 Partitioning Choices
- 2.11 Selecting from Multiple Disks
- 2.12 Selecting Entire Disk or Partition
- 2.13 Confirmation
- 2.14 Select Partition Scheme
- 2.15 Review Created Partitions
- 2.16 Final Confirmation
- 2.17 Manually Create Partitions
- 2.18 Manually Create Partitions
- 2.19 Manually Create Partitions
- 2.20 ZFS Partitioning Menu
- 2.21 ZFS Pool Type
- 2.22 Disk Selection
- 2.23 Invalid Selection
- 2.24 Rescan Devices
- 2.25 Analyzing a Disk
- 2.26 Pool Name
- 2.27 Swap Amount
- 2.28 Last Chance
- 2.29 Disk Encryption Password
- 2.30 Initializing Encryption
- 2.31 Fetching Distribution Files
- 2.32 Verifying Distribution Files
- 2.33 Extracting Distribution Files
- 2.34 Setting the
rootPassword - 2.35 Select a Region
- 2.36 Select a Country
- 2.37 Select a Time Zone
- 2.38 Confirm Time Zone
- 2.39 Select Date
- 2.40 Select Time
- 2.41 Selecting Additional Services to Enable
- 2.42 Selecting Hardening Security Options
- 2.43 Add User Accounts
- 2.44 Enter User Information
- 2.45 Exit User and Group Management
- 2.46 Final Configuration
- 2.47 Manual Configuration
- 2.48 Complete the Installation
- 2.49 Choose a Network Interface
- 2.50 Scanning for Wireless Access Points
- 2.51 Choosing a Wireless Network
- 2.52 WPA2 Setup
- 2.53 Choose IPv4 Networking
- 2.54 Choose IPv4DHCP Configuration
- 2.55 IPv4 Static Configuration
- 2.56 Choose IPv6 Networking
- 2.57 Choose IPv6 SLAAC Configuration
- 2.58 IPv6 Static Configuration
- 2.59 DNS Configuration
- 2.60 Choosing a Mirror
List of Tables
- 2.1 Partitioning Schemes
- 3.1 Utilities for Managing User Accounts
- 3.2 Disk Device Names
- 3.3 Common Environment Variables
- 5.1 XDM Configuration Files
- 7.1 Common Error Messages
- 9.1 Output PDLs
- 13.1 Loader Built-In Commands
- 13.2 Kernel Interaction During Boot
- 14.1 Login Class Resource Limits
- 17.1 Default Audit Event Classes
- 17.2 Prefixes for Audit Event Classes
- 23.1 Common Language and Country Codes
- 23.2 Defined Terminal Types for Character Sets
- 23.3 Available Console from Ports Collection
- 23.4 Available Input Methods
- 24.1 FreeBSD Versions and Repository Branchs
- 27.1 RS-232C Signal Names
- 27.2 DB-25 to DB-25 Null-Modem Cable
- 27.3 DB-9 to DB-9 Null-Modem Cable
- 27.4 DB-9 to DB-25 Null-Modem Cable
- 31.1 Useful
pfctlOptions - 32.1 Commonly Seen Routing Table Flags
- 32.2 Reserved IPv6 Addresses
- 33.1 FreeBSD Git Repository URL Table
List of Examples
- 2.1 Creating Traditional Split File System Partitions
- 3.1 Adding a User on FreeBSD
- 3.2 Using
chpassas Superuser - 3.3 Using
chpassas Regular User - 3.4 Conceptual Model of a Disk
- 5.1 Select Intel® Video Driver in a File
- 5.2 Select Radeon Video Driver in a File
- 5.3 Select
VESAVideo Driver in a File - 5.4 Select
scfbVideo Driver in a File - 12.1 Creating a Swap File
- 13.1 boot0 Screenshot
- 13.2 boot2 Screenshot
- 13.3 Configuring an Insecure Console in /etc/ttys
- 15.1 mergemaster(8) on Untrusted Jail
- 15.2 mergemaster(8) on Trusted Jail
- 15.3 Running BIND in a Jail
- 24.1 Increasing the Number of Build Jobs
- 30.1 Reloading the inetd Configuration File
- 32.1 LACP Aggregation with a Cisco® Switch
- 32.2 Failover Mode
- 32.3 Failover Mode Between Ethernet and Wireless Interfaces