FreeBSD Handbook : Linux Emulation : How to install the Linux emulator
Previous: Linux Emulation
Next: Installing Linux Emulation in 2.1-STABLE

21.1. How to install the Linux emulator

Linux emulation in FreeBSD has reached a point where it is possible to run a large fraction of Linux binaries in both a.out and ELF format. The linux emulation in the -STABLE branch is capable of running Linux DOOM and Mathematica; the version present in FreeBSD-CURRENT is vastly more capable and runs all these as well as Quake, Abuse, IDL, netrek for Linux and a whole host of other programs.

There are some Linux-specific operating system features that are not supported on FreeBSD. Linux binaries will not work on FreeBSD if they use the Linux /proc filesystem (which is different from the optional FreeBSD /proc filesystem) or i386-specific calls, such as enabling virtual 8086 mode.

To tell whether your kernel is configured for Linux compatibility simply run any Linux binary. If it prints the error message

linux-executable: Exec format error. Wrong Architecture.
then you do not have linux compatibility support and you need to configure and install a new kernel.

Depending on which version of FreeBSD you are running, how you get Linux-emulation up will vary slightly:

21.1.1. Installing Linux Emulation in 2.1-STABLE

21.1.2. Installing Linux Emulation in 2.2-CURRENT

21.1.3. Installing Linux Runtime Libraries

21.1.3.1. Installing using the linux_lib port
21.1.3.2. Installing libraries manually
21.1.3.3. How to install additional shared libraries
21.1.3.4. Configuring the ld.so -- for FreeBSD-current only

21.1.4. Configuring the host name resolver

21.1.5. Finding the necessary files


FreeBSD Handbook : Linux Emulation : How to install the Linux emulator
Previous: Linux Emulation
Next: Installing Linux Emulation in 2.1-STABLE