English Portuguese (Brazil)
Part II. Common Tasks
Chapter 10. Linux® Binary Compatibility
Linux(R) Binary Compatibility
FreeBSD provides binary compatibility with Linux(R), allowing users to install and run most Linux(R) binaries on a FreeBSD system without having to first modify the binary. It has even been reported that, in some situations, Linux(R) binaries perform better on FreeBSD than they do on Linux(R).
However, some Linux(R)-specific operating system features are not supported under FreeBSD. For example, Linux(R) binaries will not work on FreeBSD if they overly use i386(TM) specific calls, such as enabling virtual 8086 mode.
Support for 64-bit binary compatibility with Linux(R) was added in FreeBSD 10.3.
How to enable Linux(R) binary compatibility on a FreeBSD system.
How to install additional Linux(R) shared libraries.
How to install Linux(R) applications on a FreeBSD system.
The implementation details of Linux(R) compatibility in FreeBSD.
Know how to install crossref:ports[ports,additional third-party software].
Configuring Linux(R) Binary Compatibility
By default, Linux(R) libraries are not installed and Linux(R) binary compatibility is not enabled. Linux(R) libraries can either be installed manually or from the FreeBSD Ports Collection.
Before attempting to build the port, load the Linux(R) kernel module, otherwise the build will fail:
# kldload linux
# kldload linux64
% kldstat
Id Refs Address Size Name
1 2 0xc0100000 16bdb8 kernel
7 1 0xc24db000 d000 linux.ko
The package:emulators/linux_base-c7[] package or port is the easiest way to install a base set of Linux(R) libraries and binaries on a FreeBSD system. To install the port:
# pkg install emulators/linux_base-c7
For Linux(R) compatibility to be enabled at boot time, add this line to [.filename]#/etc/rc.conf#: