{"id":36220,"date":"2024-12-12T13:36:43","date_gmt":"2024-12-12T12:36:43","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=36220"},"modified":"2024-12-12T13:36:43","modified_gmt":"2024-12-12T12:36:43","slug":"freebsd-basics-7-the-linux-compatibility-layer","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/","title":{"rendered":"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Now that we know how to <a href=\"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-6-the-ports-collection\/\" target=\"_blank\" rel=\"noreferrer noopener\">work with the ports collection<\/a> let&#8217;s have a look another option you have in FreeBSD: Sometimes it might be required to run unmodified Linux binaries on FreeBSD and to achieve this, FreeBSD comes with a Linux compatibility layer. This is optional and not enabled by default, but pretty easy to setup and use. Before you do that, please check if the functionality you&#8217;re looking for is not already there as either a package or the ports collection. If it is there, use it from there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To enable the layer at  boot time, use &#8220;sysrc&#8221; as we&#8217;ve done it in the previous post and start the corresponding service:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,3,4]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ sysrc linux_enable=&quot;YES&quot;\nlinux_enable: NO -&gt; YES\nroot@freebsd14:~ $ service linux start\nroot@freebsd14:~ $ service linux describe\nEnable Linux ABI\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Once the service is running, you&#8217;ll see additional mountpoints which Linux applications usually are expecting under &#8220;\/compat\/linux&#8221;:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ df -h | grep compat\nlinprocfs                             8.0K      0B    8.0K     0%    \/compat\/linux\/proc\nlinsysfs                              8.0K      0B    8.0K     0%    \/compat\/linux\/sys\ndevfs                                 1.0K      0B    1.0K     0%    \/compat\/linux\/dev\nfdescfs                               1.0K      0B    1.0K     0%    \/compat\/linux\/dev\/fd\ntmpfs                                 2.2G    4.0K    2.2G     0%    \/compat\/linux\/dev\/shm\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">This also loaded the required kernel modules:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ kldstat | grep -i linux\n10    1 0xffffffff82e2f000    30a80 linux.ko\n11    4 0xffffffff82e60000     c2a8 linux_common.ko\n12    1 0xffffffff82e6d000    2de10 linux64.ko\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The next step is to install the Linux userland. Currently, two of those are available (Debian is available with the <a href=\"https:\/\/docs.freebsd.org\/en\/books\/handbook\/linuxemu\/\" target=\"_blank\" rel=\"noreferrer noopener\">debootstrap<\/a> package):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ pkg search linux_base\nlinux_base-c7-7.9.2009_3       Base set of packages needed in Linux mode (Linux CentOS 7.9.2009)\nlinux_base-rl9-9.4             Base set of packages needed in Linux mode (Rocky Linux 9.4)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As CentOS 7 is end of life, we&#8217;ll obviously go for the Rocky Linux 9.4 userland (this is not the most recent minor release as of today, but it is close). You&#8217;ll also see those userlands in the ports tree in the &#8220;emulators&#8221; category:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ ls -la \/usr\/ports\/emulators\/linux_base-*\n\/usr\/ports\/emulators\/linux_base-c7:\ntotal 124\ndrwxr-xr-x    2 root wheel      8 Dec 11 09:49 .\ndrwxr-xr-x  193 root wheel    194 Dec 11 09:49 ..\n-rw-r--r--    1 root wheel   6478 Dec 11 09:49 Makefile\n-rw-r--r--    1 root wheel  36074 Dec 11 09:49 distinfo\n-rw-r--r--    1 root wheel    468 Dec 11 09:49 pkg-descr\n-rw-r--r--    1 root wheel  95620 Dec 11 09:49 pkg-plist.aarch64\n-rw-r--r--    1 root wheel 108836 Dec 11 09:49 pkg-plist.amd64\n-rw-r--r--    1 root wheel  95512 Dec 11 09:49 pkg-plist.i386\n\n\/usr\/ports\/emulators\/linux_base-rl9:\ntotal 132\ndrwxr-xr-x    2 root wheel      8 Dec 11 09:49 .\ndrwxr-xr-x  193 root wheel    194 Dec 11 09:49 ..\n-rw-r--r--    1 root wheel   6943 Dec 11 09:49 Makefile\n-rw-r--r--    1 root wheel   1380 Dec 11 09:49 Makefile.version\n-rw-r--r--    1 root wheel  40711 Dec 11 09:49 distinfo\n-rw-r--r--    1 root wheel    466 Dec 11 09:49 pkg-descr\n-rw-r--r--    1 root wheel  91404 Dec 11 09:49 pkg-plist.aarch64\n-rw-r--r--    1 root wheel 104964 Dec 11 09:49 pkg-plist.amd64\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As usual, when it comes to binary packages, pkg is used to bring this onto the system:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ pkg install linux_base-rl9\nUpdating FreeBSD repository catalogue...\nFreeBSD repository is up to date.\nAll repositories are up to date.\nUpdating database digests format: 100%\nThe following 1 package(s) will be affected (of 0 checked):\n\nNew packages to be INSTALLED:\n        linux_base-rl9: 9.4\n\nNumber of packages to be installed: 1\n\nThe process will require 297 MiB more space.\n39 MiB to be downloaded.\n\nProceed with this action? &#x5B;y\/N]: y\n&#x5B;1\/1] Fetching linux_base-rl9-9.4.pkg: 100%   39 MiB  20.5MB\/s    00:02    \nChecking integrity... done (0 conflicting)\n&#x5B;1\/1] Installing linux_base-rl9-9.4...\n&#x5B;1\/1] Extracting linux_base-rl9-9.4: 100%\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Looking again at the &#8220;\/compat\/linux&#8221; structure, this is now populated:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ ls -la \/compat\/linux\/\ntotal 39\ndrwxr-xr-x  11 root wheel  16 Dec 11 17:04 .\ndrwxr-xr-x   3 root wheel   3 Dec 11 16:15 ..\ndrwxr-xr-x   2 root wheel   2 Dec 11 17:04 afs\nlrwxr-xr-x   1 root wheel   7 May 16  2022 bin -&gt; usr\/bin\ndrwxr-xr-x  10 root wheel 512 Dec 11 17:04 dev\ndrwxr-xr-x  24 root wheel  60 Dec 11 17:04 etc\nlrwxr-xr-x   1 root wheel   7 May 16  2022 lib -&gt; usr\/lib\nlrwxr-xr-x   1 root wheel   9 May 16  2022 lib64 -&gt; usr\/lib64\ndrwxr-xr-x   2 root wheel   2 Dec 11 17:04 opt\ndr-xr-xr-x   1 root wheel   0 Dec 11 17:06 proc\nlrwxr-xr-x   1 root wheel   8 Oct 31 02:04 run -&gt; \/var\/run\nlrwxr-xr-x   1 root wheel   8 May 16  2022 sbin -&gt; usr\/sbin\ndrwxr-xr-x   2 root wheel   2 Dec 11 17:04 srv\ndr-xr-xr-x   1 root wheel   0 Dec 11 17:06 sys\ndrwxr-xr-x   8 root wheel   9 Dec 11 17:04 usr\ndrwxr-xr-x  16 root wheel  17 Dec 11 17:04 var\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">If we chroot into this, we have a Rocky Linux environment to work with:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,2]; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ 1 chroot \/compat\/linux\/\nsh-5.1$ cat \/etc\/os-release \nNAME=&quot;Rocky Linux&quot;\nVERSION=&quot;9.4 (Blue Onyx)&quot;\nID=&quot;rocky&quot;\nID_LIKE=&quot;rhel centos fedora&quot;\nVERSION_ID=&quot;9.4&quot;\nPLATFORM_ID=&quot;platform:el9&quot;\nPRETTY_NAME=&quot;Rocky Linux 9.4 (Blue Onyx)&quot;\nANSI_COLOR=&quot;0;32&quot;\nLOGO=&quot;fedora-logo-icon&quot;\nCPE_NAME=&quot;cpe:\/o:rocky:rocky:9::baseos&quot;\nHOME_URL=&quot;https:\/\/rockylinux.org\/&quot;\nBUG_REPORT_URL=&quot;https:\/\/bugs.rockylinux.org\/&quot;\nSUPPORT_END=&quot;2032-05-31&quot;\nROCKY_SUPPORT_PRODUCT=&quot;Rocky-Linux-9&quot;\nROCKY_SUPPORT_PRODUCT_VERSION=&quot;9.4&quot;\nREDHAT_SUPPORT_PRODUCT=&quot;Rocky Linux&quot;\nREDHAT_SUPPORT_PRODUCT_VERSION=&quot;9.4&quot;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">What we don&#8217;t have, is neither rpm nor dnf:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,3]; title: ; notranslate\" title=\"\">\nsh-5.1$ which rpm\nwhich: no rpm in (\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/root\/bin)\nsh-5.1$ which dnf\nwhich: no dnf in (\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/root\/bin)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">rpm can be installed by installing the rpm4 package first:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nroot@freebsd14:~ $ pkg search rpm4\nrpm4-4.18.2_1                  Red Hat Package Manager\nroot@freebsd14:~ $ pkg install rpm4\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Once we have that, we can download a rpm e.g. from the Rocky Linux repositories:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:\/compat\/linux $ fetch https:\/\/dl.rockylinux.org\/pub\/rocky\/9\/BaseOS\/x86_64\/os\/Packages\/u\/unzip-6.0-57.el9.x86_64.rpm\nunzip-6.0-57.el9.x86_64.rpm                            179 kB 3851 kBps    00s\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Confirm that unzip is not yet available:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nroot@freebsd14:\/compat\/linux $ find . -name &quot;unzip&quot;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Install it, and verify it is usable:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,3,7]; title: ; notranslate\" title=\"\">\nroot@freebsd14:\/compat\/linux $ rpm2cpio &lt; unzip-6.0-57.el9.x86_64.rpm   | cpio -id\n787 blocks\nroot@freebsd14:\/compat\/linux $ find . -name &quot;unzip&quot;\n.\/usr\/bin\/unzip\n.\/usr\/share\/licenses\/unzip\n.\/usr\/share\/doc\/unzip\nroot@freebsd14:\/compat\/linux $ .\/usr\/bin\/unzip --help\nUnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send\nbug reports using http:\/\/www.info-zip.org\/zip-bug.html; see README for details.\n\nUsage: unzip &#x5B;-Z] &#x5B;-opts&#x5B;modifiers]] file&#x5B;.zip] &#x5B;list] &#x5B;-x xlist] &#x5B;-d exdir]\n  Default action is to extract files in list, except those in xlist, to exdir;\n  file&#x5B;.zip] may be a wildcard.  -Z =&gt; ZipInfo mode (&quot;unzip -Z&quot; for usage).\n\n  -p  extract files to pipe, no messages     -l  list files (short format)\n  -f  freshen existing files, create none    -t  test compressed archive data\n  -u  update files, create if necessary      -z  display archive comment only\n  -v  list verbosely\/show version info       -T  timestamp archive to latest\n  -x  exclude files that follow (in xlist)   -d  extract files into exdir\nmodifiers:\n  -n  never overwrite existing files         -q  quiet mode (-qq =&gt; quieter)\n  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files\n  -j  junk paths (do not make directories)   -aa treat ALL files as text\n  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields\n  -C  match filenames case-insensitively     -L  make (some) names lowercase\n  -X  restore UID\/GID info                   -V  retain VMS version numbers\n  -K  keep setuid\/setgid\/tacky permissions   -M  pipe through &quot;more&quot; pager\n  -O CHARSET  specify a character encoding for DOS, Windows and OS\/2 archives\n  -I CHARSET  specify a character encoding for UNIX and other archives\n\nSee &quot;unzip -hh&quot; or unzip.txt for more help.  Examples:\n  unzip data1 -x joe   =&gt; extract all files except joe from zipfile data1.zip\n  unzip -p foo | more  =&gt; send contents of foo.zip via pipe into program more\n  unzip -fo foo ReadMe =&gt; quietly replace existing ReadMe if archive file newer\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Nice. If you have the requirement to use Linux tools on FreeBSD, this can be very helpful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that we know how to work with the ports collection let&#8217;s have a look another option you have in FreeBSD: Sometimes it might be required to run unmodified Linux binaries on FreeBSD and to achieve this, FreeBSD comes with a Linux compatibility layer. This is optional and not enabled by default, but pretty easy&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[42],"tags":[2718,2256,46],"class_list":["post-36220","post","type-post","status-publish","format-standard","category-operating-systems","tag-bsd","tag-freebsd","tag-linux-unix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer\" \/>\n<meta property=\"og:description\" content=\"Now that we know how to work with the ports collection let&#8217;s have a look another option you have in FreeBSD: Sometimes it might be required to run unmodified Linux binaries on FreeBSD and to achieve this, FreeBSD comes with a Linux compatibility layer. This is optional and not enabled by default, but pretty easy&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-12T12:36:43+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer\",\"datePublished\":\"2024-12-12T12:36:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/\"},\"wordCount\":323,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"BSD\",\"FreeBSD\",\"Linux\\\/UNIX\"],\"articleSection\":[\"Operating System\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/\",\"name\":\"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-12-12T12:36:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/freebsd-basics-7-the-linux-compatibility-layer\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/","og_locale":"en_US","og_type":"article","og_title":"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer","og_description":"Now that we know how to work with the ports collection let&#8217;s have a look another option you have in FreeBSD: Sometimes it might be required to run unmodified Linux binaries on FreeBSD and to achieve this, FreeBSD comes with a Linux compatibility layer. This is optional and not enabled by default, but pretty easy&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2024-12-12T12:36:43+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer","datePublished":"2024-12-12T12:36:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/"},"wordCount":323,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["BSD","FreeBSD","Linux\/UNIX"],"articleSection":["Operating System"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/","url":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/","name":"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2024-12-12T12:36:43+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/freebsd-basics-7-the-linux-compatibility-layer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FreeBSD basics \u2013 7 \u2013 The Linux compatibility layer"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/36220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=36220"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/36220\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=36220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=36220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=36220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}