The Linux+FreeBSD mini-HOWTO: Running Linux binaries under FreeBSD

prev-3886597 next-6905776 toc-5024484

FreeBSD has the ability to run Linux binaries, both in a.out and ELF formats. To do this you have to take the following three steps:

  1. You have to enable Linux compatibility. To do this (in FreeBSD 2.2.2 — details may vary in other versions) you have to edit your /etc/rc.conf file and change
    
    linux_enable="NO"
    

    to

    
    linux_enable="YES"
    
  2. You have to install the Linux shared libraries. They are included in FreeBSD 2.2.2 as the package linux_lib-2.4.tgz (a newer version might be out now.) Run the command
    
    pkg_add /linux_lib-2.4.tgz
    

    to install the package. is the directory where the package is stored.

  3. Install the Linux program(s) you want to run. The program(s) can be installed on either UFS or ext2fs file systems. See section Mounting ext2fs file systems under FreeBSD for more information about using ext2fs file systems under FreeBSD.

I have successfully run the Linux versions of Applixware 4.3 and Netscape 3.01 (both ELF format) under FreeBSD 2.2.2 using this method (yes, I know there is a native FreeBSD version of Netscape 4.) Read the FreeBSD documentation for more information on this topic.

prev-3886597 next-6905776 toc-5024484

READ  3.3.4 Copying files