The Unix Way ■ Episode 02
You need a Linux binary on your server. A proprietary backup agent your client insists on. A vendor tool compiled for RHEL. Spotify, because even sysadmins have feelings. The binary exists. The source does not. It was built for Linux and Linux alone.
On FreeBSD, you type three commands:
sysrc linux_enable="YES"
service linux start
pkg install linux-rl9-base
Done. Linux binaries run. Natively. No emulator. No container. No virtual machine. No 2 GB RAM overhead. The FreeBSD kernel translates Linux system calls to FreeBSD system calls in real time, at less than 1% overhead, and has been doing so since 1995.
$ file /compat/linux/usr/bin/bash
ELF 64-bit LSB executable, x86-64, for GNU/Linux
$ /compat/linux/usr/bin/bash --version
GNU bash, version 5.2.15 (x86_64-redhat-linux-gnu)
A real Linux binary. Running on a FreeBSD kernel. Without virtualisation. The door is open, and it only swings one way.
How It Works
The mechanism is called the Linuxulator, and it is far more elegant than the name suggests. When a Linux binary makes a system call, the FreeBSD kernel recognises the Linux ABI and routes the call through a translation layer that maps it to the equivalent FreeBSD syscall. No userspace emulation. No binary translation. No instruction-set simulation. The work happens in the kernel itself, where it costs almost nothing.
The current base is Rocky Linux 9 (linux-rl9-base),
previously CentOS 7. The Linuxulator provides /compat/linux,
a directory tree containing the Linux userland: libraries,
dynamic linker, filesystem hierarchy. Linux binaries see a
Linux world. FreeBSD binaries see a FreeBSD world. Both share
the same kernel, the same network stack, the same hardware
drivers.
What runs: most Linux command-line tools, commercial software (Spotify, Discord, Zoom), Steam and Proton for gaming, proprietary backup and monitoring agents, and containers via Linux jails. The list is longer than the list of things that do not run, which should tell you something about thirty years of engineering.
The Reverse Does Not Exist
Now try it the other way. You want a FreeBSD binary on Linux.
Option A: virtual machine. Install FreeBSD inside QEMU/KVM. Allocate 2 GB of RAM. Wait for it to boot. Configure networking. Maintain a second operating system. For one binary.
Option B: container. A FreeBSD userland in Docker? The container runtime assumes a Linux kernel. FreeBSD userland on a Linux kernel is not a supported configuration. The door is locked.
Option C: recompile. Port the software. Fix the libc differences. Replace kqueue with epoll. Chase the divergence between POSIX-conformant and POSIX-adjacent. Pack a lunch.
There is no "FreeBSD Compatibility Layer" for Linux. The direction does not exist. This is not a criticism of Linux. It is a consequence of how the two systems were designed.
Why the Asymmetry?
FreeBSD is an operating system. Kernel, userland, documentation, ports tree: all developed together, by one project, under one umbrella. When the FreeBSD project decided in 1995 that Linux binary compatibility would be useful, they could implement it because they controlled the entire stack. The kernel's syscall layer was designed with clean abstraction in mind. Adding a second ABI was an engineering project, not a political one.
Linux is a kernel. Everything else, the distributions, the package managers, the init systems, the C libraries, is maintained by separate teams with separate goals. Nobody "owns" Linux in the way the FreeBSD project owns FreeBSD. Implementing a FreeBSD compatibility layer would require coordination across projects that do not coordinate. It would require syscall abstraction that was never a design goal. It would require someone to care enough to maintain it for thirty years.
This is not a deficiency. It is a design decision, made decades ago, with consequences that compound. FreeBSD chose integration. Linux chose modularity. Both are valid. But only one of them lets you run the other's binaries.
Best of Both Worlds
The practical upshot is this: on FreeBSD, you do not have to
choose. You get ZFS, Jails, pf, DTrace, and a kernel
developed as a coherent whole. And when you need that one
Linux binary, the proprietary agent, the vendor tool, the
application that only ships as an .rpm, the door
is open.
Sometimes the question is not "why switch?" It is "why limit yourself?"
FreeBSD can run Linux. Linux cannot run FreeBSD. The door swings one way. It has for thirty years.