BSDun: Running FreeBSD Binaries Directly on Linux
A new project called BSDun is taking on an unusual challenge: running FreeBSD binaries directly on Linux without recompiling them. The project is only about two weeks old, but its early progress is already noteworthy.
What is BSDun?
BSDun is a Linux kernel module that teaches the kernel how to recognize and load FreeBSD ELF executables. The programs run against a FreeBSD userland under /compat/freebsd, which must be populated with the required libraries and base system components. The concept mirrors FreeBSD's Linuxulator, which allows FreeBSD to run Linux binaries. BSDun does the opposite.
What already works?
According to the project's GitLab page, created on June 23, 2026, BSDun already supports a considerable range of FreeBSD software and features:
- FreeBSD's
/bin/shand shell functionality - Statically and dynamically linked programs (using
ld-elf.so.1,libc.so.7, andlibthr.so.3) - Networking and DNS resolution
- FreeBSD's
pkgpackage manager ping,kqueue/kevent, and threading- Command-line tools including
sed,awk,grep,find,stat,tail, and others
How does it work?
BSDun registers a FreeBSD ELF handler in Linux's binary format chain. When a program is started, the module checks the ELF OSABI field or a FreeBSD ABI note to determine whether it is a FreeBSD binary.
If it is, BSDun loads the ELF image, creates a FreeBSD-compatible auxiliary vector, and redirects the runtime environment to the FreeBSD compatibility root. The module also handles system call and signal translation, along with additional ABI compatibility between FreeBSD and Linux.
Limitations
BSDun is still experimental. It is not part of the upstream Linux kernel and should not be considered a stable subsystem. Many parts are still under active development, and compatibility continues to improve. One security-related limitation is that Capsicum calls are currently treated as successful no-ops because Linux does not implement FreeBSD's Capsicum sandboxing model. As a result, some applications may run without matching FreeBSD's security behavior exactly.
Conclusion
BSDun is only about two weeks old and has not yet published any releases. Even so, the project already demonstrates how far binary compatibility between Unix-like operating systems can be pushed. Whether it will eventually become a practical solution for everyday use remains to be seen.