Linux Compatibility
In some cases, a port is offered based on a Linux binary distribution of the software. This is done primarily in the case of closed-source software that is not available as a FreeBSD native binary (e.g. Matlab). Since FreeBSD and Linux are nearly identical at the API level, software developed on either of them is usually extremely easy to port to the other. However, there are some commercial applications that are only supported on Linux. The FreeBSD Linux compatibility system provides a way to run them directly on FreeBSD.Note that Linux binaries running on FreeBSD show NO MEASURABLE PERFORMANCE LOSS. Linux binaries run essentially natively under FreeBSD; they have the same access to all hardware resources as FreeBSD native binaries. The only added costs are a small kernel module to map Linux system calls into the BSD kernel, and the space required for Linux libraries and a few other basic components. The process of trapping and translating a Linux system call into the BSD environment obviously adds a delay, but this delay is so small that it can't even be measured empirically. In reality, the delay is only a short sequence of machine instructions per system call, which is generally negligible compared to the cost of the system call itself.
The space required is also small. The Linux base system alone takes only about 100 megabytes. Linux libraries and other software on my workstation totals less than 1 gigabyte, most of which is the Matlab installation. If you do not have Linux compatibility installed, it will be installed automatically as a prerequisite for any Linux-based ports provided here.
![]()