Lesson 1 of 9 · 23m
The Base System Mental Model
Learn why FreeBSD's coherent operating system boundary changes patching, configuration, debugging, and expectations compared with a Linux distribution.
The first mistake Linux administrators make on FreeBSD is treating it as a distribution with different package commands. FreeBSD is a complete operating system: kernel, core userland, libraries, documentation, and build machinery are developed together. Third-party software lives in /usr/local and is deliberately not the base system. Once that boundary clicks, most of FreeBSD stops feeling alien.
/ versus /usr/local is a security boundary
On a typical system, the operating system owns /bin, /sbin, /etc, /lib, /usr/bin, /usr/sbin, and related paths. Packages install under /usr/local:
which pfctl
# /sbin/pfctl is the PF control tool in the base system
which nginx
# /usr/local/sbin/nginx, if installed from pkg or portsThis separation is not cosmetic. A bad third-party upgrade should not rewrite core system utilities. Conversely, an operating-system upgrade can make broad assumptions about base components because they are versioned together.
Configuration follows ownership
Base configuration belongs primarily in /etc; package configuration belongs in /usr/local/etc. Runtime overrides are usually composed through /etc/rc.conf:
sysrc sshd_enable=YES
sysrc nginx_enable=YES
sysrc nginx_configtest=YES
cat /etc/rc.confUse sysrc rather than editing /etc/rc.conf with sed scripts. It preserves comments, avoids duplicate keys, and fails predictably when syntax is wrong. On a fleet, that is the difference between a clean configuration diff and a boot surprise.
Read the handbook, then read the man pages
FreeBSD documentation is unusually operational because it documents the system the project actually ships. man jail, man pf.conf, man zfs, man rc.conf, and man freebsd-update are not afterthoughts. When blog advice conflicts with the installed man page, the installed man page usually describes your release more accurately.
The kernel and userland move together
Linux encourages mixing arbitrary kernels with arbitrary userlands. FreeBSD expects a coherent pair. That is why freebsd-update handles both, why uname -a matters, and why building a custom kernel is a deliberate infrastructure decision rather than a routine tuning exercise.
uname -a
freebsd-version -kuIf kernel and userland versions disagree after an upgrade, treat that as a real operational state. Some kernel modules, jails, and diagnostic assumptions can become inconsistent until the reboot and upgrade sequence is completed.
A new hire's day-one rules
Do not copy Linux habits blindly. Do not replace base tools with random third-party equivalents unless there is a reason. Do not hand-edit generated or package-owned files without understanding which upgrade will overwrite them. And do not mistake minimalism for lack of capability: FreeBSD is small because it is coherent, not because it is incomplete.
Field notes
/etc/rc.confcontrols service startup, but many daemons also have package-specific files under/usr/local/etc.freebsd-version -kuis the quick way to compare running kernel and installed userland.- Base utilities sometimes have fewer GNU extensions; portable scripts should avoid Linux-only flags.
- The base system boundary is an advantage during incident response: unexpected binaries outside
/usr/localdeserve attention.
Was this lesson helpful?