FreeBSD Handbook

The FreeBSD Documentation Project

Welcome to FreeBSD! This handbook covers the installation and day to day use of FreeBSD 4.4-RELEASE. This manual is a work in progress and is the work of many individuals. Many sections do not yet exist and some of those that do exist need to be updated. If you are interested in helping with this project, send email to the FreeBSD documentation project mailing list . The latest version of this document is always available from the FreeBSD web site. It may also be downloaded in a variety of formats and compression options from the FreeBSD FTP server or one of the numerous mirror sites. If you would prefer to have a hard copy of the handbook, you can purchase one at the FreeBSD Mall. You may also want to search the handbook.


Table of Contents
I. Getting Started
1 Introduction
1.1 Synopsis
1.2 Welcome to FreeBSD!
1.3 About the FreeBSD Project
2 Installing FreeBSD
2.1 Synopsis
2.2 Pre-installation Tasks
2.3 Starting the Installation
2.4 Introducing Sysinstall
2.5 Allocating Disk Space
2.6 Choosing What To Install
2.7 Choosing Your Installation Media
2.8 Committing to the Installation
2.9 Post-installation
2.10 Supported Hardware
2.11 Troubleshooting
2.12 Advanced Installation Guide
2.13 Preparing Your Own Installation Media
3 Unix Basics
3.1 Synopsis
3.2 Permissions
3.3 Directory Structure
3.4 Mounting and Unmounting Filesystems
3.5 Processes
3.6 Daemons, Signals, and Killing Processes
3.7 Shells
3.8 Text Editors
3.9 Devices and Device Nodes
3.10 For More Information...
4 Installing Applications: Packages and Ports
4.1 Synopsis
4.2 Overview of Software Installation
4.3 Finding Your Application
4.4 Using the Packages System
4.5 Using the Ports Collection
4.6 Troubleshooting
5 The X Window System
5.1 Synopsis
5.2 Understanding X
5.3 Installing XFree86
5.4 XFree86 Configuration
5.5 Using Fonts in XFree86
5.6 The X Display Manager
5.7 Desktop Environments
II. System Administration
6 Configuration and Tuning
6.1 Synopsis
6.2 Initial Configuration
6.3 Core Configuration
6.4 Application Configuration
6.5 Starting Services
6.6 Virtual Hosts
6.7 Configuration Files
6.8 Tuning with sysctl
6.9 Tuning Disks
6.10 Tuning Kernel Limits
7 The FreeBSD Booting Process
7.1 Synopsis
7.2 The Booting Problem
7.3 The MBR, and Boot Stages One, Two, and Three
7.4 Kernel Interaction During Boot
7.5 Init: Process Control Initialization
7.6 Shutdown Sequence
8 Users and Basic Account Management
8.1 Synopsis
8.2 Introduction
8.3 The Superuser Account
8.4 System Accounts
8.5 User Accounts
8.6 Modifying Accounts
8.7 Limiting Users
8.8 Personalizing Users
8.9 Groups
9 Configuring the FreeBSD Kernel
9.1 Synopsis
9.2 Why Build a Custom Kernel?
9.3 Building and Installing a Custom Kernel
9.4 The Configuration File
9.5 Making Device Nodes
9.6 If Something Goes Wrong
10 Security
10.1 Synopsis
10.2 Introduction
10.3 Securing FreeBSD
10.4 DES, MD5, and Crypt
10.5 S/Key
10.6 Kerberos
10.7 Firewalls
10.8 OpenSSL
10.9 IPsec
10.10 OpenSSH
11 Printing
11.1 Synopsis
11.2 Introduction
11.3 Basic Setup
11.4 Advanced Printer Setup
11.5 Using Printers
11.6 Alternatives to the Standard Spooler
11.7 Troubleshooting
12 Storage
12.1 Synopsis
12.2 Device Names
12.3 Adding Disks
12.4 Network, Memory, and File-Based Filesystems
12.5 File System Quotas
12.6 Creating and Using Optical Media (CDs & DVDs)
12.7 RAID
12.8 Tape Backup Media
12.9 Backup Programs
12.10 Backups to Floppies
13 Localization - I18N/L10N Usage and Setup
13.1 Synopsis
13.2 The Basics
13.3 Using Localization
13.4 Compiling I18N Programs
13.5 Localizing FreeBSD to Specific Languages
14 Sound
14.1 Synopsis
14.2 Locating the Correct Device
14.3 Recompiling the Kernel
14.4 Creating and Testing the Device Nodes
14.5 Common Problems
14.6 MP3 Audio
15 Serial Communications
15.1 Synopsis
15.2 Introduction
15.3 Terminals
15.4 Dial-in Service
15.5 Dial-out Service
15.6 Setting Up the Serial Console
16 PPP and SLIP
16.1 Synopsis
16.2 Using User PPP
16.3 Using Kernel PPP
16.4 Using PPP over Ethernet (PPPoE)
16.5 Using PPP over ATM (PPPoA)
16.6 Using SLIP
17 Advanced Networking
17.1 Synopsis
17.2 Gateways and Routes
17.3 Bridging
17.4 NFS
17.5 Diskless Operation
17.6 ISDN
17.7 NIS/YP
17.8 DHCP
17.9 DNS
17.10 NTP
17.11 Network Address Translation
17.12 inetd ``Super-Server''
18 Electronic Mail
18.1 Synopsis
18.2 Using Electronic Mail
18.3 sendmail Configuration
18.4 Troubleshooting
18.5 Advanced Topics
19 The Cutting Edge
19.1 Synopsis
19.2 FreeBSD-CURRENT vs. FreeBSD-STABLE
19.3 Synchronizing Your Source
19.4 Using make world
20 Linux Binary Compatibility
20.1 Synopsis
20.2 Installation
20.3 Installing Mathematica
20.4 Installing Maple
20.5 Installing Oracle
20.6 Installing SAP R/3 (4.6B - IDES)
20.7 Advanced Topics
III. Appendices
A. Obtaining FreeBSD
A.1 CDROM Publishers
A.2 DVD Publishers
A.3 FTP Sites
A.4 Anonymous CVS
A.5 Using CTM
A.6 Using CVSup
A.7 CVS Tags
A.8 AFS Sites
B. Bibliography
B.1 Books & Magazines Specific to FreeBSD
B.2 Users' Guides
B.3 Administrators' Guides
B.4 Programmers' Guides
B.5 Operating System Internals
B.6 Security Reference
B.7 Hardware Reference
B.8 Unix History
B.9 Magazines and Journals
C. Resources on the Internet
C.1 Mailing Lists
C.2 Usenet Newsgroups
C.3 World Wide Web Servers
C.4 Email Addresses
C.5 Shell Accounts
D. PGP Keys
D.1 Officers
D.2 Core Team Members
D.3 Developers
Colophon
List of Tables
2-1. Sample Device Inventory
2-2. Disk Device Codes
2-3. Partition Layout for First Disk
2-4. Partition Layout for Subsequent Disks
12-1. Physical Disk Naming Conventions
List of Figures
2-1. Kernel Configuration Menu
2-2. The Kernel Device Configuration Visual Interface
2-3. Expanded Driver List
2-4. Driver Configuration With No Conflicts
2-5. Sysinstall Main Menu
2-6. Typical Device Probe Results
2-7. Select Sysinstall Exit
2-8. Selecting Usage From Sysinstall Main Menu
2-9. Selecting Documentation Menu
2-10. Sysinstall Documentation Menu
2-11. Sysinstall Main Menu
2-12. Sysinstall Keymap Menu
2-13. Sysinstall Main Menu
2-14. Sysinstall Options
2-15. Begin Standard Installation
2-16. Select Drive for FDisk
2-17. Typical Fdisk Partitions Before Editing
2-18. Fdisk Partition Using Entire Disk
2-19. Sysinstall Boot Manager Menu
2-20. Exit Select Drive
2-21. Sysinstall Disklabel Editor
2-22. Sysinstall Disklabel Editor With Auto Defaults
2-23. Free Space For Root Partition
2-24. Edit Root Partition Size
2-25. Choose The Root Partition Type
2-26. Choose The Root Mount Point
2-27. Sysinstall Disklabel Editor
2-28. Choose Distributions
2-29. Confirm Distributions
2-30. Choose Installation Media
2-31. Selecting An Ethernet Device
2-32. Set Network Configuration For ed0
2-33. Editing inetd.conf
2-34. Default Anonymous FTP Configuration
2-35. Edit The FTP Welcome Message
2-36. Editing the Exports File
2-37. Security Profile Options
2-38. System Console Configuration Options
2-39. Screensaver Options
2-40. Screensaver Timeout
2-41. System Console Configuration Exit
2-42. Select Your Region
2-43. Select Your Country
2-44. Select Your Timezone
2-45. Select Mouse Protocol Type
2-46. Set Mouse Protocol
2-47. Configure Mouse Port
2-48. Setting The Mouse Port
2-49. Enable The Mouse Daemon
2-50. Test The Mouse Daemon
2-51. Select Configuration Method Menu
2-52. Select Default Desktop
2-53. Select Package Category
2-54. Select Packages
2-55. Install Packages
2-56. Confirm Package Installation
2-57. Select Add User
2-58. Add User Information
2-59. Exit User and Group Management
2-60. Exit Install
List of Examples
2-1. Using an existing partition unchanged
2-2. Shrinking an existing partition
2-3. Sample Disk, Slice, and Partition Names
2-4. Conceptual Model of a Disk
4-1. Downloading a Package and then Installing It Locally
7-1. boot0 Screenshot
7-2. boot2 Screenshot
7-3. An Insecure Console in /etc/ttys
8-1. Configuring adduser
8-2. rmuser Interactive Account Removal
8-3. Interactive chpass by Superuser
8-4. Interactive chpass by Normal User
8-5. Changing Your Password
8-6. Changing Another User's Password as the Superuser
8-7. Adding a Group Using pw(8)
8-8. Adding Somebody to a Group Using pw(8)
8-9. Using id(1) to Determine Group Membership
12-1. Using vnconfig to mount an Existing Filesystem Image
12-2. Creating a New File-Backed Disk with vnconfig
12-3. md Memory Disk
12-4. Using rdump over ssh
12-5. A Script for Creating a Bootable Floppy
15-1. Adding Terminal Entries to /etc/ttys
17-1. Mounting an Export with amd
17-2. Branch Office or Home Network
17-3. Head Office or Other LAN
17-4. Sending inetd a HangUP Signal
18-1. Configuring the sendmail Access Database
18-2. Mail Aliases
18-3. Example Virtual Domain Mail Map
A-1. Checking Out Something from -CURRENT (ls(1)) and Deleting It Again:
A-2. Checking Out the Version of ls(1) in the 3.X-STABLE Branch:
A-3. Creating a List of Changes (as unified diffs) to ls(1)
A-4. Finding Out What Other Module Names Can Be Used:

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.