← Back to Blog

February 20, 2026 · Announcement

Announcing Lochs: FreeBSD Containers for Linux

Today we're open-sourcing Lochs — a tool that brings FreeBSD's jail containerization to Linux, powered by real-time syscall translation.

FreeBSD jails have existed since 2000 — over a decade before Docker. They offer VNET virtual networking, Capsicum capability-based security, and native ZFS integration. But they've always been locked to FreeBSD.

Lochs changes that. Using BSDulator's ptrace-based syscall interception, unmodified FreeBSD binaries — including the jail management utilities themselves — run directly on Linux. No VMs, no emulation overhead, no kernel patches.

What's Working Today

This is an alpha release. Here's where we are honestly:

BSDulator can execute core FreeBSD rescue binaries: ls, cat, pwd, echo, sh (with pipes and redirection), and tar (read operations). The FreeBSD dynamic linker (ld-elf.so.1) works for both static and dynamically-linked executables.

Jail syscalls are emulated: jail_set, jail_get, jail_attach, and jail_remove all work, backed by Linux namespaces (mount, UTS, PID) and chroot-based filesystem isolation. State persists across sessions via /tmp/bsdulator_jails.dat.

VNET networking is functional. Each jail gets its own Linux network namespace with a veth pair connected to a bridge (bsdjail0 at 10.0.0.1/24). Host-to-jail and jail-to-jail connectivity works.

What's Not Working Yet

Being honest about the current state:

This is systems programming at the ABI level. It's hard. But the foundation is solid and we're shipping incrementally.

Try It

git clone https://github.com/lochs-dev/lochs.git
cd lochs
make
sudo ./bsdulator ./freebsd-root/libexec/ld-elf.so.1 ./freebsd-root/bin/ls -la

Requires Linux kernel 3.8+, x86_64, root privileges, and iproute2 for networking features. Tested on Ubuntu, Debian, Fedora, Arch, and WSL2.

BSDulator Phase 3: VNET Networking is Live →