23. How to install Linux Emulation
Introduction to FreeBSD

Linux emulation allows you run linux binaries on your FreeBSD system. It actually works very well. There are two ways to run the emulation:

  • Compiled into the Kernel

  • As a Loadable Kernel Module (lkm)

Either way you install it, you must first install the Linux libraries from the ports collection.

cd /usr/ports/emulators/linux_lib

make install

This will install all the linux libraries into /usr/compat/. It will install the script /usr/bin/linux, which loads the kernel loadable module needed for linux emulation.

If you wish to run linux emulation using the lkm, all you need to do after this is modify your /etc/rc.conf at the following line.

  linux_enable="YES"      # Linux emulation loaded at startup (or NO). 

This will enable Linux emulation at boot up. If you wish start Linux emulation with out rebooting, just type linux. (You need to be root to do this).

If you don't use the lkm, you need to rebuild your kernel and include

  options         COMPAT_LINUX 

in your kernel config file. Now, Linux emulation will always be enabled. You do not need to modify your rc.conf

Return to Table of Contents

Visit the Gifcom