upvote
FreeBSD has supported Linux emulation for a long time (https://docs.freebsd.org/en/books/handbook/linuxemu/). The emulation is at the syscall level but enough to run most apps.
reply
If you mean an isolated linux instance _including a linux kernel_, that would be provided by a virtual machine running under the bhyve hypervisor on freebsd (https://docs.freebsd.org/en/books/handbook/virtualization/#v...). You probably could frankenkludge something like linux-userland-on-a-frebsd-kernel using jails but that certainly seems like the path less traveled, haha. :)
reply
I would not worry about running a distro. Most things are similar, there are some minor differences between the GNU applications and the FreeBSD alternatives. But for most people there is nothing to worry about. Most applications runs fine on BSD. Bind, PowerDNS, Java Applications, PostgreSQL, Python, rsync and many more. Getting PyTorch to work with Nvidia and Cuda is most likely another story.

My main culprit with FreeBSD is that upgrading the kernel is not a simple dnf update command. But its still easier than upgrading RHEL from 9 to 10.

reply
There is a significant investment in a linux compatible system call layer, and a linux compatible runtime link library suite.

It isn't a complete answer, but the position as I understand it (haven't had to care for a long time) is that a LOT of linux binaries can work.

reply
> can you run any Linux distribution in a FreeBSD jail

-ish. There's a compatibility layer that works at the libc level but not the syscall level. In practice anything open source that works in emulation almost certainly has a FreeBSD version and anything proprietary that actually needs Linux will work better in a VM.

reply
I believe you are asking about bhyve for running Linux on FreeBSD. Jails are for software isolation.
reply
If I understand the question correctly: You want to run a Linux distribution like (say) Debian in a FreeBSD jail? With the Linux kernel and all?
reply
deleted
reply
Yes what is confusing is it might be simpler than one might think.

To run a Linux distribution in jail you need 2 things:

- Enable "Linux Binary Compatibility"

- copy your Linux distribution base filesystem in the chroot or just pick on that is packaged in FreeBSD and do 'pkg install' (Rocky and Ubuntu if I remember correctly)

But you might not even need to "Run a Linux distribution". Just enabling "Linux Binary Compatibility" and executing the binary often works fine if it doesn't depends on a bunch of libraries.

It is really that simple.

reply