BSD

Berkeley Software Distribution — the branch of Unix that gave the world TCP/IP networking, the vi editor, virtual memory, and OpenSSH. Born at UC Berkeley in 1977, BSD shaped the modern internet and lives on in FreeBSD, macOS, PlayStation, and more.

What is BSD?

BSD (Berkeley Software Distribution) began as a set of additions to AT&T Unix made by students and researchers at the University of California, Berkeley. Over time it grew into a complete operating system in its own right. The 4.2BSD release in 1983 implemented the TCP/IP stack that became the networking foundation of the entire internet.

After a legal dispute with AT&T was settled in 1994, BSD was free to be distributed freely. Three main open source descendants emerged: FreeBSD (performance), OpenBSD (security), and NetBSD (portability). The BSD networking stack also formed the core of macOS, iOS, and Sony's PlayStation OS.

Why BSD Matters

The Internet Runs on BSD
4.2BSD's TCP/IP implementation (1983) became the networking stack of the early internet. Every router and server in the 1990s internet used it.
OpenSSH — Everywhere
Created by the OpenBSD project. Over 90% of the world's internet-facing servers use OpenSSH. Every cloud instance you SSH into uses OpenBSD code.
macOS Is BSD
Apple's Darwin kernel merges BSD (FreeBSD userland) with the Mach microkernel. macOS is a certified UNIX built on BSD foundations.
PlayStation OS
Sony's PlayStation 4 and PlayStation 5 operating systems (Orbis OS / Prospero OS) are based on FreeBSD. The same OS in 100M+ consoles.
Netflix CDN
Netflix runs its Open Connect CDN appliances on FreeBSD, streaming to 300M+ subscribers. FreeBSD's network stack is legendary for performance.
Security by Default
OpenBSD pioneered exploit mitigations (W^X, ASLR, pledge, unveil) years before any other OS. It's had only two remote holes in 25+ years.
ZFS & DTrace
FreeBSD ported Sun's revolutionary ZFS filesystem and DTrace dynamic tracing framework — technologies that later came to Linux and macOS.
Permissive License
The BSD license allows proprietary use without sharing source code. This is why Apple, Sony, and thousands of companies built on BSD.

BSD Mascot: Beastie

The BSD mascot is "Beastie" — a friendly red devil created by artist Phil Foglio in 1988. The name is a phonetic play on "BSD." Beastie holds a trident, representing the BSD kernel's power. Each BSD variant has adapted the mascot: OpenBSD has Puffy the pufferfish, NetBSD has a flag, and DragonFly BSD has a dragonfly.

BSD Variants

The four major open source BSDs, each with a distinct focus: performance, security, portability, and scalability.

😈
FreeBSD
Performance & Scale
The most widely deployed BSD. Known for excellent network performance, enterprise stability, and a complete base system. Runs Netflix, WhatsApp infrastructure, and PlayStation OS.
  • ZFS filesystem (ported from Solaris)
  • DTrace dynamic tracing
  • Jails — lightweight OS-level virtualization
  • Ports collection (30,000+ packages)
  • bhyve hypervisor
  • NUMA-aware networking stack
  • Capsicum capability framework
🐡
OpenBSD
Security First
Founded by Theo de Raadt after a dispute in the NetBSD project. Security is not a feature — it's the goal. Only two remote holes in the default install in 25+ years.
  • OpenSSH — the world's most-used SSH
  • pf — packet filter firewall
  • W^X (writable XOR executable memory)
  • pledge() and unveil() syscall restrictions
  • ASLR on by default
  • LibreSSL (fork of OpenSSL)
  • OpenNTPD, OpenSMTPD
🚩
NetBSD
Portability
The most portable OS in existence. Runs on more CPU architectures than any other OS — from old VAX hardware to modern ARM to SPARC. "Of course it runs NetBSD."
  • Runs on 60+ CPU architectures
  • pkgsrc — portable package system
  • Rump Kernels (kernel components as userspace libs)
  • Verified exec (veriexec)
  • NetBSD/embedded for IoT devices
  • Excellent cross-compilation support
🐉
DragonFly BSD
Multiprocessor Scalability
Forked from FreeBSD 4.x by Matt Dillon in 2003 to pursue a radically different approach to SMP scalability using a message-passing kernel architecture.
  • HAMMER2 — scalable, transactional filesystem
  • Lightweight Kernel Threads (LWKTs)
  • Message-passing IPC between CPUs
  • VKERNEL — run DragonFly as a userspace process
  • Excellent multi-core scalability
🍎
macOS / Darwin
Apple's BSD
Apple's Darwin OS combines a BSD (FreeBSD) userland with the XNU kernel (Mach + BSD). Certified as UNIX since 2007. Powers macOS, iOS, iPadOS, tvOS, and watchOS.
  • XNU hybrid kernel (Mach + FreeBSD)
  • APFS — Apple File System
  • Grand Central Dispatch
  • DTrace (ported from Solaris)
  • Homebrew package manager
  • 2 billion active Apple devices

BSD Features & Technologies

Technologies invented or pioneered by BSD that changed computing forever.

Networking

TCP/IP Stack (4.2BSD, 1983)
Bill Joy's Berkeley TCP/IP implementation became the standard. DARPA funded it. Every internet-connected device descends from this code.
Sockets API
BSD introduced the socket() abstraction for network programming. The BSD socket API is still the interface used by every language and OS for network I/O.
pf (Packet Filter)
OpenBSD's firewall, later ported to FreeBSD and macOS. pf is the firewall inside every Mac and most BSDs. Known for its clean configuration language.
OpenSSH
Created by OpenBSD in 1999. The SSH protocol implementation used on virtually every Linux/Unix server in the world. Replaced insecure telnet/rsh everywhere.

File Systems

FFS / UFS (Fast File System)
Created by Kirk McKusick at Berkeley. Replaced the original Unix filesystem with cylinder groups and locality-optimized allocation. Basis of UFS2 still used in BSDs today.
ZFS (Zettabyte File System)
Originally from Sun/Solaris, ported to FreeBSD. Combined filesystem + volume manager. 128-bit addressing, copy-on-write, atomic snapshots, and always-on checksumming.
HAMMER2 (DragonFly BSD)
Matt Dillon's clustered filesystem. Fully transactional, supports live deduplication, and is designed to span multiple machines in a cluster.
NFS (Network File System)
BSD was an early implementer of NFS, the protocol for mounting remote filesystems over a network. NFS was created by Sun; BSD spread it everywhere.

Security

Jails (FreeBSD)
Introduced in FreeBSD 4.0 (2000). OS-level virtualization — isolated environments sharing one kernel. The conceptual predecessor to Linux containers and Docker.
pledge() / unveil()
OpenBSD's syscall sandboxing. pledge() restricts what syscalls a process can use. unveil() restricts filesystem access. Applied to almost every base utility.
W^X
Write XOR Execute memory — memory pages cannot be both writable and executable simultaneously. OpenBSD pioneered this exploit mitigation in 2003.
Capsicum (FreeBSD)
A capability-based security model. Processes run with minimal privileges in a sandboxed mode. Used by Chromium's sandbox on FreeBSD.

Virtualization

bhyve (FreeBSD)
A hypervisor built into FreeBSD. Runs Linux, Windows, and other BSDs as VMs with near-native performance. The foundation of iXsystems' TrueNAS hypervisor.
VKERNEL (DragonFly BSD)
Run a full DragonFly BSD kernel as a userspace process. Useful for kernel development and testing without actual hardware or a VM.

Observability

DTrace
Dynamic tracing framework from Sun, ported to FreeBSD and macOS. Observe any kernel or userspace event in real-time without restarting processes.
ktrace / truss
BSD syscall tracing tools (analogous to Linux's strace). Trace every system call a process makes to understand its behavior.

BSD Commands & Tools

Notable BSD-specific commands and tools — many of which were later adopted by Linux or influenced its alternatives.

System Administration

pkg
FreeBSD binary package manager
pkg install nginx
ports
Build software from source
cd /usr/ports/www/nginx && make install
pkgsrc
NetBSD portable package system
cd /usr/pkgsrc/www/nginx && make install
service
Manage rc.d services
service nginx start
rc.conf
System configuration file
echo 'nginx_enable="YES"' >> /etc/rc.conf
sysctl
Read/write kernel parameters
sysctl kern.version
kldload
Load a kernel module (FreeBSD)
kldload pf
loader.conf
Boot-time kernel config
echo 'zfs_load="YES"' >> /boot/loader.conf

Jails (FreeBSD)

jail
Create and manage jails
jail -c path=/jails/web
jls
List running jails
jls
jexec
Execute command inside jail
jexec web /bin/sh
jail.conf
Jail configuration file
cat /etc/jail.conf

ZFS (FreeBSD / OpenBSD)

zpool create
Create a new ZFS pool
zpool create tank mirror da0 da1
zpool status
Pool health and I/O stats
zpool status -v tank
zfs create
Create a ZFS dataset
zfs create tank/data
zfs snapshot
Atomic point-in-time snapshot
zfs snapshot tank/data@backup1
zfs send/recv
Stream snapshots across systems
zfs send tank@snap | ssh host zfs recv
zfs set
Set dataset properties
zfs set compression=lz4 tank

pf Firewall (OpenBSD / FreeBSD)

pfctl -e
Enable pf firewall
pfctl -e
pfctl -f
Load pf rules from file
pfctl -f /etc/pf.conf
pfctl -si
Show pf info/state
pfctl -si
pfctl -ss
Show state table
pfctl -ss

Diagnostics

dmesg
Kernel ring buffer messages
dmesg | grep error
top
BSD's enhanced top
top -m io
systat
Interactive system statistics
systat -vmstat 1
sockstat
List open sockets
sockstat -l -p 80
dtrace
Dynamic tracing
dtrace -n 'syscall:::entry{@[execname]=count();}'
truss
Trace syscalls (like strace)
truss -p 1234
fstat
List open files by process
fstat -p 1234
vmstat
Virtual memory statistics
vmstat 1

BSD vs Linux vs macOS

How the major BSD variants and Linux compare across key dimensions.

Feature Comparison

Feature FreeBSD OpenBSD NetBSD Linux macOS
ZFSNativeNo3rd partyOpenZFSRead-only
Jails / ContainersJailsvmmvndcgroups/nsLimited
DTraceFullNoPartialbpftraceFull
pf FirewallYesYesYesnftablesYes
Security defaultGoodExcellentGoodVariesGood
Hardware supportWideLimitedWidestWidestApple only
Package count30,000+9,000+20,000+50,000+Homebrew
Base system designUnifiedUnifiedUnifiedFragmentedUnified
BSD licenseYesYesYesGPLMixed
Init systemrc.drc.drc.dsystemdlaunchd
Desktop useVia portsMinimalMinimalWidePrimary
Server productionExcellentExcellentGoodDominantLimited

When to Choose BSD

Choose FreeBSD when...
You need maximum network throughput, ZFS storage, jail-based isolation, or are building a NAS (TrueNAS). Netflix, WhatsApp, and CDN operators choose FreeBSD.
Choose OpenBSD when...
Security is the non-negotiable requirement. Firewalls, VPN gateways, and edge routers running pf. Used by security researchers and government systems.
Choose NetBSD when...
You need to run an OS on unusual or legacy hardware, or are building an embedded system. Also excellent for porting software to new architectures.
Choose Linux when...
You need the widest hardware support, the largest software ecosystem, Docker/Kubernetes, or are deploying to cloud VMs. Linux dominates cloud and containers.

BSD History

From Bill Joy's first patch set in 1977 to the OS inside every PlayStation today — the complete story of Berkeley Software Distribution.

1975
Berkeley Gets Unix V6
AT&T licenses Unix Version 6 to the University of California, Berkeley, for a nominal fee of $400. The Computer Science Division begins modifying it immediately.
1977
1BSD — Bill Joy's First Distribution
Graduate student Bill Joy releases the Berkeley Software Distribution — a package of additions to Unix V6 including a Pascal compiler and the ex line editor.
1978
2BSD — vi and csh
Bill Joy releases 2BSD, which includes vi (the visual editor, still used everywhere) and the C shell (csh). These tools define a generation of Unix users.
1979
3BSD — Virtual Memory
3BSD adds virtual memory support to Unix for the first time. This allows programs larger than physical RAM. DARPA begins funding BSD development.
1980
DARPA Funding — Building the Internet
DARPA contracts UC Berkeley to add TCP/IP networking to Unix. This is the decision that shapes the entire internet. The team is led by Bill Joy and Bob Fabry.
1983
4.2BSD — The TCP/IP Revolution
The landmark release. Includes a complete, high-quality implementation of TCP/IP. DARPA adopts it as the official internet protocol stack. This is the networking code that powers the internet.
1986
4.3BSD
Major networking improvements, NFS support, and performance enhancements. Bill Joy leaves Berkeley to co-found Sun Microsystems. Marshall Kirk McKusick leads development.
1989
Net/1 — First Free Release
Berkeley releases Net/1 — the networking code without AT&T-licensed components. The first freely redistributable part of BSD.
1991
Net/2 — Nearly Free BSD
A nearly complete BSD system with all AT&T code removed. BSDI sells a commercial product based on Net/2. AT&T threatens to sue.
1992
AT&T Lawsuit
AT&T's Unix Systems Laboratories sues BSDI and UC Berkeley over alleged copyright violation. Development freezes for two years while the lawsuit is in court. Linux fills the void.
1993
FreeBSD 1.0 and NetBSD 0.8
While the lawsuit continues, FreeBSD (focus: x86) and NetBSD (focus: portability) are both released. Two distinct open source BSD projects begin independently.
1994
Lawsuit Settled — 4.4BSD-Lite
The lawsuit is settled. Berkeley releases 4.4BSD-Lite with the AT&T-claimed files replaced. FreeBSD, NetBSD, and the new commercial BSDs all rebase on this. BSD is free.
1995
CSRG Disbands
The Computer Systems Research Group at Berkeley is disbanded. Development continues through the independent FreeBSD, OpenBSD, and NetBSD projects.
1996
OpenBSD Founded
Theo de Raadt forks NetBSD to create OpenBSD, focused purely on security. Begins systematic code auditing. Will go on to create OpenSSH and transform internet security.
1999
OpenSSH Released
OpenBSD team releases OpenSSH 1.2. Within a year it replaces every commercial and insecure SSH implementation worldwide. Today it's on virtually every server.
2000
FreeBSD Jails
FreeBSD introduces Jails in version 4.0 — lightweight OS virtualization predating Linux containers by years. The conceptual ancestor of Docker.
2001
macOS — BSD Goes Mainstream
Apple releases Mac OS X, built on Darwin — a combination of Mach microkernel and FreeBSD userland. BSD reaches mass consumers for the first time.
2003
DragonFly BSD Forked
Matt Dillon forks FreeBSD 4.x to pursue a message-passing kernel architecture for better SMP scaling. Later creates HAMMER2 filesystem.
2007
macOS Certified UNIX
Apple's Mac OS X Leopard receives official UNIX 03 certification from The Open Group. 150 million Mac users are now running a certified UNIX.
2013
PlayStation 4 Ships on FreeBSD
Sony launches PS4 running Orbis OS — based on FreeBSD 9. Over 117 million PS4 units sold. BSD quietly powers the world's most popular gaming console.
2020
PlayStation 5 on FreeBSD
PS5 launches with Prospero OS, also FreeBSD-based. Netflix's CDN, WhatsApp, and Xbox cloud gaming also run on BSD derivatives.
2024
BSD Turns 47
FreeBSD 14.x, OpenBSD 7.x, and NetBSD 10.x are all actively developed. BSD is inside the device in your pocket (via iOS), your gaming console (via PlayStation), and the CDN streaming your video.