Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
LINUX(4)		    Kernel Interfaces Manual		      LINUX(4)

NAME
       linux --	Linux ABI support

SYNOPSIS
       To  enable  the	Linux  ABI  at	boot time, place the following line in
       rc.conf(5):

	     linux_enable="YES"

DESCRIPTION
       The linux kernel	module provides	limited	Linux ABI (application	binary
       interface)  compatibility,  making  it  possible	to run many unmodified
       Linux applications without the need for	virtualization	or  emulation.
       Some of the facilities provided are:

       o   Linux to native system call translation

       o   Linux-specific system calls

       o   Special signal handling for Linux processes

       o   Path	translation mechanism

       o   Linux-specific virtual file systems

       The path	translation mechanism makes Linux processes look up file paths
       under  emul_path	 (defaulting to	/compat/linux) before /.  For example,
       when Linux process attempts to open /etc/passwd,	it will	really	access
       /compat/linux/etc/passwd,  unless  the  latter does not exist.  This is
       used to make sure Linux processes load Linux shared  libraries  instead
       of  their similarly-named FreeBSD counterparts, and also	to provide al-
       ternative versions of certain other files and virtual file systems.

       To install Linux	shared libraries and system files into	/compat/linux,
       either	use   the   emulators/linux_base-c7   port   or	  package,  or
       debootstrap(8) installed	from sysutils/debootstrap.

       To avoid	mounting Linux-specific	filesystems at startup,	add  the  fol-
       lowing line to the rc.conf(5) file:

	     linux_mounts_enable="NO"

SYSCTL VARIABLES
       The  following  variables are available as both sysctl(8) variables and
       loader(8) tunables:

       compat.linux.debug
	       Enable debugging	messages.  Set to 0 to silence them.  Defaults
	       to 3.  A	setting	of 1 prints debug messages, tells about	 unim-
	       plemented  stuff	 (only	once).	 Set  to 2 is like 1, but also
	       prints messages about implemented but not  tested  stuff	 (only
	       once).  Setting it to 3 or higher is like 2, but	no rate	limit-
	       ing of messages.

       compat.linux.default_openfiles
	       Default	soft  openfiles	resource limit for Linux applications.
	       Set to -1 to disable the	limit.	Defaults to 1024.

       compat.linux.emul_path
	       Path  to	 the  Linux   run-time	 environment.	 Defaults   to
	       /compat/linux.

       compat.linux.osname
	       Linux kernel operating system name.  Defaults to	"Linux".

       compat.linux.osrelease
	       Linux  kernel operating system release.	Changing this to some-
	       thing else is discouraged on non-development  systems,  because
	       it  may	change	the way	Linux programs work.  Some versions of
	       GNU libc	are known to use different syscalls depending  on  the
	       value of	this sysctl.

       compat.linux.oss_version
	       Linux Open Sound	System version.	 Defaults to 198144.

       compat.linux.preserve_vstatus
	       When  set  to  1, it prevents Linux applications	from resetting
	       the termios(4) VSTATUS setting.	From a user perspective,  this
	       makes SIGINFO work for Linux executables.  Defaults to 1.

       compat.linux.setid_allowed
	       Enable  handling	 of set-user-ID	and set-group-ID mode bits for
	       the new process image file when image is	to be  executed	 under
	       Linux  ABI.  When set to	0, new Linux images always use creden-
	       tials of	the program that issued	the execve(2) call, regardless
	       of the image file mode.	This might be reasonable or  even  re-
	       quired,	because	FreeBSD	does not emulate the Linux environment
	       completely, and missed features may result in security vulnera-
	       bilities.  Defaults to 1.

       compat.linux32.emulate_i386
	       In the x86_64 (amd64) world enable the  real  i386  Linuxulator
	       behavior.   For example,	when set to 0, Linux uname -m will re-
	       turn "x86_64" even if uname itself is a i386 Linux  executable.
	       When  set  to  1,  Linux	i386 uname -m will return "i686".  De-
	       faults to 0.

FILES
       /compat/linux	      Linux run-time environment
       /compat/linux/dev      device file system, see devfs(5)
       /compat/linux/dev/fd   file descriptor file  system  mounted  with  the
			      linrdlnk option, see fdescfs(5)
       /compat/linux/dev/shm  in-memory	file system, see tmpfs(5)
       /compat/linux/proc     Linux process file system, see linprocfs(5)
       /compat/linux/sys      Linux    kernel	objects	  file	 system,   see
			      linsysfs(5)

SEE ALSO
       brandelf(1), pty(4),  elf(5),  fdescfs(5),  linprocfs(5),  linsysfs(5),
       tmpfs(5)

HISTORY
       Linux  ABI support first	appeared for i386 in FreeBSD 2.1.  Support for
       amd64 binaries first appeared in	FreeBSD	10.3.  Support for arm64 bina-
       ries first appeared in FreeBSD 12.0.

BUGS
       Support for some	of the Linux-specific system calls and system call ar-
       guments is missing.

FreeBSD	13.2			January	9, 2022			      LINUX(4)

NAME | SYNOPSIS | DESCRIPTION | SYSCTL VARIABLES | FILES | SEE ALSO | HISTORY | BUGS

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=linux&manpath=FreeBSD+14.0-RELEASE+and+Ports>

home | help