BSD installation
BSD systems share Unix lineage with Linux but ship distinct packaging toolchains and a strong convention: base system in / and /usr, third-party software in /usr/local.
Overview: Installation architecture. Linux contrast: Linux installation.
Family snapshot
| System | Ports tree | Binary packages |
|---|---|---|
FreeBSD |
|
|
NetBSD |
|
|
OpenBSD |
|
|
All emphasize building from source with flags vs downloading opaque blobs—though binary packages are normal for servers and laptops.
/usr/local layout
Third-party installs typically land in:
-
/usr/local/bin,/usr/local/lib,/usr/local/share -
/usr/local/etcfor configuration
This mirrors FHS spirit but does not imply Debian-style alternatives or systemd everywhere—init and service stories differ.
rc.d and services
BSD traditionally uses rc.d scripts in /usr/local/etc/rc.d (or /etc/rc.d for base).
Enable in rc.conf (*_enable="YES" on FreeBSD).
Linux-centric install docs that only mention systemctl need a BSD adapter for daemons you ship.
pkg vs ports
-
pkg — fast, signed packages from project mirrors; good for production servers.
-
ports — customize
MAKE_ARGS,OPTIONS, jails, and poudriere bulk builds.
Uninstall is pkg delete or deinstall from ports—file lists are tracked; ad-hoc copy into /usr/local without registration is as discouraged as on Linux.
Differences from Linux assumptions
-
libc and kernel — binaries built on glibc Ubuntu do not run on FreeBSD; ship FreeBSD builds in CI (see Polyglot CI matrix).
-
Linuxulator — optional Linux binary compatibility on FreeBSD; not a substitute for native packages for performance-sensitive GUI apps.
-
No apt/dnf — documentation must name
pkg/pkgincommands. -
ZFS root — common on FreeBSD; snapshot before major package upgrades is operational best practice.