]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/linux.4
libedit: vendor import libedit 2021-03-28
[FreeBSD/FreeBSD.git] / share / man / man4 / linux.4
1 .\" Copyright (c) 2000 Sheldon Hearn
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd July 5, 2020
28 .Dt LINUX 4
29 .Os
30 .Sh NAME
31 .Nm linux
32 .Nd Linux ABI support
33 .Sh SYNOPSIS
34 To compile support for this ABI into an i386 kernel
35 place the following line in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
38 .Cd "options COMPAT_LINUX"
39 .Ed
40 .Pp
41 for an amd64 kernel use:
42 .Bd -ragged -offset indent
43 .Cd "options COMPAT_LINUX32"
44 .Ed
45 .Pp
46 Alternatively, to load the ABI as a
47 module at boot time, place the following line in
48 .Xr loader.conf 5 :
49 .Bd -literal -offset indent
50 linux_load="YES"
51 .Ed
52 .Sh DESCRIPTION
53 The
54 .Nm
55 module provides limited Linux ABI (application binary interface) compatibility,
56 making it possible to run many unmodified Linux applications and libraries
57 without the need for virtualization or emulation.
58 Some of the facilities provided are:
59 .Bl -bullet
60 .It
61 An image activator
62 for correctly branded
63 .Xr elf 5
64 executable images
65 .It
66 Special signal handling for activated images
67 .It
68 Linux to native system call translation
69 .It
70 Linux-specific system calls
71 .El
72 .Pp
73 Note that dynamically linked Linux executables
74 will require a suitable environment in
75 .Pa /compat/linux .
76 This includes native Linux shared libraries, and Linux-specific virtual
77 filesystems.
78 To set it up, install the
79 .Pa emulators/linux_base-c7
80 port or the linux_base-c7
81 package, and add the following line to the
82 .Xr rc.conf 5
83 file:
84 .Pp
85 .Dl linux_enable="YES"
86 .Pp
87 To avoid mounting Linux-specific filesystems at startup, also add the following
88 line:
89 .Pp
90 .Dl linux_mounts_enable="NO"
91 .Sh SYSCTL VARIABLES
92 The following variables are available as both
93 .Xr sysctl 8
94 variables and
95 .Xr loader 8
96 tunables:
97 .Bl -tag -width indent
98 .It Va compat.linux.debug
99 Enable debugging messages.
100 Set to 0 to silence them.
101 Defaults to 3.
102 A setting of 1 prints debug messages, tells about unimplemented stuff (only
103 once).
104 Set to 2 is like 1, but also prints messages about implemented but not tested
105 stuff (only once).
106 Setting it to 3 or higher is like 2, but no rate limiting of messages.
107 .It Va compat.linux.default_openfiles
108 Default soft openfiles resource limit for Linux applications.
109 Set to -1 to disable the limit.
110 Defaults to 1024.
111 .It Va compat.linux.emul_path
112 Path to the Linux run-time environment.
113 Defaults to
114 .Pa /compat/linux .
115 .It Va compat.linux.osname
116 Linux kernel operating system name.
117 .It Va compat.linux.osrelease
118 Linux kernel operating system release.
119 Changing this to something else is discouraged on non-development systems,
120 because it may change the way Linux programs work.
121 Recent versions of GNU libc are known to use different syscalls depending
122 on the value of this sysctl.
123 .It Va compat.linux.oss_version
124 Linux Open Sound System version.
125 .It Va compat.linux.preserve_vstatus
126 When set to 1, it prevents Linux applications from resetting the
127 .Xr termios 4
128 VSTATUS setting.
129 From a user perspective, this makes
130 .Va SIGINFO
131 work for Linux executables.
132 Defaults to 0.
133 .El
134 .Sh FILES
135 .Bl -tag -width /compat/linux/dev/shm -compact
136 .It Pa /compat/linux
137 minimal Linux run-time environment
138 .It Pa /compat/linux/dev
139 device file system, see
140 .Xr devfs 5
141 .It Pa /compat/linux/dev/fd
142 file descriptor file system mounted with the
143 .Cm linrdlnk
144 option, see
145 .Xr fdescfs 5
146 .It Pa /compat/linux/dev/shm
147 in-memory file system, see
148 .Xr tmpfs 5
149 .It Pa /compat/linux/proc
150 Linux process file system, see
151 .Xr linprocfs 5
152 .It Pa /compat/linux/sys
153 Linux kernel objects file system, see
154 .Xr linsysfs 5
155 .El
156 .Sh SEE ALSO
157 .Xr brandelf 1 ,
158 .Xr pty 4 ,
159 .Xr elf 5 ,
160 .Xr fdescfs 5 ,
161 .Xr linprocfs 5 ,
162 .Xr linsysfs 5 ,
163 .Xr tmpfs 5
164 .Sh HISTORY
165 Linux ABI support first appeared in
166 .Fx 2.1 .
167 .Sh BUGS
168 Support for some of the Linux-specific system calls and system call arguments
169 is missing.