# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: 2026-03-05 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/books/handbook/linuxemu/_index.adoc:1 #, no-wrap msgid "FreeBSD provides binary compatibility with Linux, allowing users to install and run most Linux binaries on a FreeBSD system without having to first modify the binary" msgstr "FreeBSD обеспечивает двоичную совместимость с Linux, позволяя пользователям устанавливать и запускать большинство двоичных исполняемых файлов Linux в системе FreeBSD без необходимости предварительного изменения двоичного файла" #. type: YAML Front Matter: part #: documentation/content/en/books/handbook/linuxemu/_index.adoc:1 #, no-wrap msgid "Part II. Common Tasks" msgstr "Часть II. Стандартные задачи" #. type: YAML Front Matter: title #: documentation/content/en/books/handbook/linuxemu/_index.adoc:1 #, no-wrap msgid "Chapter 12. Linux Binary Compatibility" msgstr "Глава 12. Двоичная совместимость с Linux" #. type: Title = #: documentation/content/en/books/handbook/linuxemu/_index.adoc:15 #, no-wrap msgid "Linux Binary Compatibility" msgstr "Двоичная совместимость с Linux" #. type: Title == #: documentation/content/en/books/handbook/linuxemu/_index.adoc:53 #, no-wrap msgid "Synopsis" msgstr "Обзор" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:58 msgid "" "FreeBSD provides *optional* binary compatibility with Linux(R), commonly " "referred to as Linuxulator, allowing users to install and run unmodified " "Linux binaries. It is available for the x86 (both 32 and 64 bit) and " "AArch64 architectures. Some Linux-specific operating system features are " "not yet supported; this mostly happens with functionality specific to " "hardware or related to system management, such as cgroups or namespaces." msgstr "" "FreeBSD предоставляет *опциональную* двоичную совместимость с Linux(R), " "часто называемую Linuxulator, что позволяет пользователям устанавливать и " "запускать неизменённые Linux-бинарники. Это доступно для архитектур x86 (как " "32, так и 64 бит) и AArch64. Некоторые специфичные для Linux функции " "операционной системы пока не поддерживаются; в основном это касается " "функциональности, связанной с оборудованием или управлением системой, такой " "как cgroups или пространства имён." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:60 msgid "Before reading this chapter:" msgstr "Прежде чем читать эту главу, необходимо:" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:62 msgid "" "Know how to install crossref:ports[ports,additional third-party software]." msgstr "" "Знать, как установить crossref:ports[ports,дополнительное стороннее " "программное обеспечение]." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:64 msgid "Read this chapter to learn:" msgstr "Прочтите эту главу, чтобы узнать:" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:66 msgid "How to enable Linux binary compatibility on a FreeBSD system." msgstr "Как включить двоичную совместимость с Linux в системе FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:67 msgid "How to install additional Linux shared libraries." msgstr "Как установить дополнительные общие библиотеки Linux." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:68 msgid "How to install Linux applications on a FreeBSD system." msgstr "Как установить Linux-приложения в системе FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:69 msgid "The implementation details of Linux compatibility in FreeBSD." msgstr "Как реализована совместимость с Linux в FreeBSD." #. type: Title == #: documentation/content/en/books/handbook/linuxemu/_index.adoc:71 #, no-wrap msgid "Configuring Linux Binary Compatibility" msgstr "Настройка бинарной совместимости с Linux" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:74 msgid "By default, man:linux[4] binary compatibility is not enabled." msgstr "По умолчанию бинарная совместимость с man:linux[4] не включена." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:76 msgid "To enable the Linux ABI at boot time, execute the following command:" msgstr "Чтобы включить ABI Linux при загрузке, выполните следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:80 #, no-wrap msgid "# sysrc linux_enable=\"YES\"\n" msgstr "# sysrc linux_enable=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:83 msgid "" "Once enabled, it can be started without rebooting by executing the following " "command:" msgstr "" "После включения его можно запустить без перезагрузки, выполнив следующую " "команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:87 #, no-wrap msgid "# service linux start\n" msgstr "# service linux start\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:90 msgid "This is enough for statically linked Linux binaries to work." msgstr "Этого достаточно для работы статически связанных Linux-библиотек." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:93 msgid "" "The Linux service will load necessary kernel modules and mount filesystems " "expected by Linux applications under [.filename]#/compat/linux#. They can " "be started in the same way native FreeBSD binaries can; they behave almost " "exactly like native processes and can be traced and debugged the usual way." msgstr "" "Сервис Linux загрузит необходимые модули ядра и смонтирует файловые системы, " "ожидаемые Linux-приложениями, в [.filename]#/compat/linux#. Их можно " "запускать так же, как и родные FreeBSD-приложения; они ведут себя почти так " "же, как родные процессы, и их можно трассировать и отлаживать обычными " "способами." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:95 msgid "" "The current content of [.filename]#/compat/linux# can be checked executing " "the following command:" msgstr "" "Текущее содержимое [.filename]#/compat/linux# можно проверить, выполнив " "следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:99 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:146 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:194 #, no-wrap msgid "# ls -l /compat/linux/\n" msgstr "# ls -l /compat/linux/\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:102 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:149 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:197 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:244 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:307 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:385 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:451 msgid "The output should be similar to the following:" msgstr "Вывод должен быть похож на следующий:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:109 #, no-wrap msgid "" "total 1\n" "dr-xr-xr-x 13 root wheel 512 Apr 11 19:12 dev\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:03 proc\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:03 sys\n" msgstr "" "total 1\n" "dr-xr-xr-x 13 root wheel 512 Apr 11 19:12 dev\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:03 proc\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:03 sys\n" #. type: Title == #: documentation/content/en/books/handbook/linuxemu/_index.adoc:112 #, no-wrap msgid "Linux userlands" msgstr "Пользовательские окружения Linux" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:116 msgid "" "Linux software requires more than just an ABI to work. In order to run " "Linux software a Linux userland must be installed first." msgstr "" "Программное обеспечение Linux требует не только ABI для работы. Для запуска " "программ Linux необходимо сначала установить пользовательское пространство " "Linux." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:120 msgid "" "If all that is wanted is to run some software already included in the Ports " "tree, it can be installed via package manager and man:pkg[8] will " "automatically setup the required Linux userland." msgstr "" "Если требуется только запустить какое-либо программное обеспечение, уже " "включённое в дерево портов, его можно установить через менеджер пакетов, и " "man:pkg[8] автоматически настроит необходимую пользовательскую среду Linux." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:122 msgid "" "For example, to install Sublime Text 4, along with all the Linux libraries " "it depends on, run this command:" msgstr "" "Например, чтобы установить Sublime Text 4 вместе со всеми необходимыми " "библиотеками Linux, выполните следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:126 #, no-wrap msgid "# pkg install linux-sublime-text4\n" msgstr "# pkg install linux-sublime-text4\n" #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:130 #, no-wrap msgid "Rocky Linux Base System from FreeBSD Packages" msgstr "Базовая система Rocky Linux из пакетов FreeBSD" #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:133 msgid "To install the Rocky Linux 9 userland execute the following command:" msgstr "" "Для установки пользовательской среды Rocky Linux 9 выполните следующую " "команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:137 #, no-wrap msgid "# pkg install linux_base-rl9\n" msgstr "# pkg install linux_base-rl9\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:140 msgid "" "package:emulators/linux_base-rl9[] will place the base system derived from " "Rocky Linux 9 into [.filename]#/compat/linux#." msgstr "" "Пакет package:emulators/linux_base-rl9[] разместит базовую систему, " "основанную на Rocky Linux 9, в [.filename]#/compat/linux#." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:142 msgid "" "After installing the package, the contents of [.filename]#/compat/linux# can " "be verified by running the following command to check that the Rocky Linux " "userland has been installed:" msgstr "" "После установки пакета содержимое [.filename]#/compat/linux# можно " "проверить, выполнив следующую команду, чтобы убедиться, что пользовательская " "среда Rocky Linux установлена:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:167 #, no-wrap msgid "" "total 36\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 afs\n" "lrwxr-xr-x 1 root wheel 7 May 16 2022 bin -> usr/bin\n" "drwxr-xr-x 3 root wheel 512 Oct 9 17:28 dev\n" "drwxr-xr-x 24 root wheel 1536 Oct 9 17:28 etc\n" "lrwxr-xr-x 1 root wheel 7 May 16 2022 lib -> usr/lib\n" "lrwxr-xr-x 1 root wheel 9 May 16 2022 lib64 -> usr/lib64\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 opt\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 proc\n" "lrwxr-xr-x 1 root wheel 8 Oct 1 03:11 run -> /var/run\n" "lrwxr-xr-x 1 root wheel 8 May 16 2022 sbin -> usr/sbin\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 srv\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 sys\n" "drwxr-xr-x 8 root wheel 512 Oct 9 17:28 usr\n" "drwxr-xr-x 16 root wheel 512 Oct 9 17:28 var\n" msgstr "" "total 36\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 afs\n" "lrwxr-xr-x 1 root wheel 7 May 16 2022 bin -> usr/bin\n" "drwxr-xr-x 3 root wheel 512 Oct 9 17:28 dev\n" "drwxr-xr-x 24 root wheel 1536 Oct 9 17:28 etc\n" "lrwxr-xr-x 1 root wheel 7 May 16 2022 lib -> usr/lib\n" "lrwxr-xr-x 1 root wheel 9 May 16 2022 lib64 -> usr/lib64\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 opt\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 proc\n" "lrwxr-xr-x 1 root wheel 8 Oct 1 03:11 run -> /var/run\n" "lrwxr-xr-x 1 root wheel 8 May 16 2022 sbin -> usr/sbin\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 srv\n" "drwxr-xr-x 2 root wheel 512 Oct 9 17:28 sys\n" "drwxr-xr-x 8 root wheel 512 Oct 9 17:28 usr\n" "drwxr-xr-x 16 root wheel 512 Oct 9 17:28 var\n" #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:170 #, no-wrap msgid "CentOS Base System from FreeBSD Packages" msgstr "Базовая система CentOS из пакетов FreeBSD" #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:178 msgid "" "package:emulators/linux_base-c7[] has been deprecated following the " "deprecation of the upstream project. This means package:emulators/" "linux_base-c7[] will not receive security updates. The use of crossref:" "linuxemu[linuxemu-rockylinux, the Rocky Linux Base System] is recommended " "unless 32-bit compatibility is needed." msgstr "" "Пакет package:emulators/linux_base-c7[] устарел после прекращения поддержки " "вышестоящего проекта. Это означает, что package:emulators/linux_base-c7[] " "больше не будет получать обновления безопасности. Рекомендуется использовать " "crossref:linuxemu[linuxemu-rockylinux, базовую систему Rocky Linux], если не " "требуется совместимость с 32-битными системами." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:181 msgid "To install the CentOS userland execute the following command:" msgstr "" "Для установки пользовательской среды CentOS выполните следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:185 #, no-wrap msgid "# pkg install linux_base-c7\n" msgstr "# pkg install linux_base-c7\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:188 msgid "" "package:emulators/linux_base-c7[] will place the base system derived from " "CentOS 7 into [.filename]#/compat/linux#." msgstr "" "Пакет package:emulators/linux_base-c7[] разместит базовую систему, " "основанную на CentOS 7, в каталоге `[.filename]#/compat/linux#`." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:190 msgid "" "After installing the package, the contents of [.filename]#/compat/linux# can " "be verified by running the following command to check that the CentOS " "userland has been installed:" msgstr "" "После установки пакета содержимое [.filename]#/compat/linux# можно " "проверить, выполнив следующую команду, чтобы убедиться, что пользовательская " "среда CentOS установлена:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:214 #, no-wrap msgid "" "total 30\n" "lrwxr-xr-x 1 root wheel 7 Apr 11 2018 bin -> usr/bin\n" "drwxr-xr-x 13 root wheel 512 Apr 11 21:10 dev\n" "drwxr-xr-x 25 root wheel 64 Apr 11 21:10 etc\n" "lrwxr-xr-x 1 root wheel 7 Apr 11 2018 lib -> usr/lib\n" "lrwxr-xr-x 1 root wheel 9 Apr 11 2018 lib64 -> usr/lib64\n" "drwxr-xr-x 2 root wheel 2 Apr 11 21:10 opt\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:25 proc\n" "lrwxr-xr-x 1 root wheel 8 Feb 18 02:10 run -> /var/run\n" "lrwxr-xr-x 1 root wheel 8 Apr 11 2018 sbin -> usr/sbin\n" "drwxr-xr-x 2 root wheel 2 Apr 11 21:10 srv\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:25 sys\n" "drwxr-xr-x 8 root wheel 9 Apr 11 21:10 usr\n" "drwxr-xr-x 16 root wheel 17 Apr 11 21:10 var\n" msgstr "" "total 30\n" "lrwxr-xr-x 1 root wheel 7 Apr 11 2018 bin -> usr/bin\n" "drwxr-xr-x 13 root wheel 512 Apr 11 21:10 dev\n" "drwxr-xr-x 25 root wheel 64 Apr 11 21:10 etc\n" "lrwxr-xr-x 1 root wheel 7 Apr 11 2018 lib -> usr/lib\n" "lrwxr-xr-x 1 root wheel 9 Apr 11 2018 lib64 -> usr/lib64\n" "drwxr-xr-x 2 root wheel 2 Apr 11 21:10 opt\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:25 proc\n" "lrwxr-xr-x 1 root wheel 8 Feb 18 02:10 run -> /var/run\n" "lrwxr-xr-x 1 root wheel 8 Apr 11 2018 sbin -> usr/sbin\n" "drwxr-xr-x 2 root wheel 2 Apr 11 21:10 srv\n" "dr-xr-xr-x 1 root wheel 0 Apr 11 21:25 sys\n" "drwxr-xr-x 8 root wheel 9 Apr 11 21:10 usr\n" "drwxr-xr-x 16 root wheel 17 Apr 11 21:10 var\n" #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:217 #, no-wrap msgid "Debian / Ubuntu Base System with debootstrap" msgstr "Debian / Ubuntu Базовая система с debootstrap" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:221 msgid "" "An alternative way of providing Linux shared libraries is by using package:" "sysutils/debootstrap[]. This has the advantage of providing a full Debian " "or Ubuntu distribution." msgstr "" "Альтернативный способ предоставления общих библиотек Linux — использование " "package:sysutils/debootstrap[]. Это имеет преимущество в виде предоставления " "полного дистрибутива Debian или Ubuntu." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:223 msgid "To install debootstrap execute the following command:" msgstr "Чтобы установить debootstrap, выполните следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:227 #, no-wrap msgid "# pkg install debootstrap\n" msgstr "# pkg install debootstrap\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:231 msgid "" "man:debootstrap[8] needs man:linux[4] ABI enabled. Once enabled, execute " "the following command to install Ubuntu or Debian in [.filename]#/compat/" "ubuntu#:" msgstr "" "Для работы man:debootstrap[8] требуется включённый man:linux[4] ABI. После " "его активации выполните следующую команду для установки Ubuntu или Debian в " "[.filename]#/compat/ubuntu#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:235 #, no-wrap msgid "# debootstrap jammy /compat/ubuntu\n" msgstr "# debootstrap focal /compat/ubuntu\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:241 msgid "" "While it is technically possible to install into [.filename]#/compat/linux# " "instead, it's discouraged due to possible clashes with CentOS-based " "packages. Instead, derive the directory name from the distribution or " "version name, e.g., [.filename]#/compat/ubuntu#." msgstr "" "Хотя технически возможно установить в [.filename]#/compat/linux#, это не " "рекомендуется из-за возможных конфликтов с пакетами на основе CentOS. Вместо " "этого используйте имя каталога, производное от названия дистрибутива или " "версии, например, [.filename]#/compat/ubuntu#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:262 #, no-wrap msgid "" "I: Retrieving InRelease\n" "I: Checking Release signature\n" "I: Valid Release signature (key id F6ECB3762474EDA9D21B7022871920D1991BC93C)\n" "I: Retrieving Packages\n" "I: Validating Packages\n" "I: Resolving dependencies of required packages...\n" "I: Resolving dependencies of base packages...\n" "I: Checking component main on http://archive.ubuntu.com/ubuntu...\n" "[...]\n" "I: Configuring console-setup...\n" "I: Configuring kbd...\n" "I: Configuring ubuntu-minimal...\n" "I: Configuring libc-bin...\n" "I: Configuring ca-certificates...\n" "I: Base system installed successfully.\n" msgstr "" "I: Retrieving InRelease\n" "I: Checking Release signature\n" "I: Valid Release signature (key id F6ECB3762474EDA9D21B7022871920D1991BC93C)" "\n" "I: Retrieving Packages\n" "I: Validating Packages\n" "I: Resolving dependencies of required packages...\n" "I: Resolving dependencies of base packages...\n" "I: Checking component main on http://archive.ubuntu.com/ubuntu...\n" "[...]\n" "I: Configuring console-setup...\n" "I: Configuring kbd...\n" "I: Configuring ubuntu-minimal...\n" "I: Configuring libc-bin...\n" "I: Configuring ca-certificates...\n" "I: Base system installed successfully.\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:265 msgid "Then set up mounts in [.filename]#/etc/fstab#." msgstr "Затем настройте точки монтирования в [.filename]#/etc/fstab#." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:269 msgid "" "If the contents of the home directory should be shared and to be able to run " "X11 applications, [.filename]#/home# and [.filename]#/tmp# should be mounted " "in the linux compat area using man:nullfs[5] for loopback." msgstr "" "Если содержимое домашнего каталога должно быть общим и необходимо иметь " "возможность запускать приложения X11, [.filename]#/home# и [.filename]#/tmp# " "следует подключить в области совместимости linux с использованием man:" "nullfs[5] для loopback (обратной петли)." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:271 msgid "The following example can be added to [.filename]#/etc/fstab#:" msgstr "Следующий пример можно добавить в [.filename]#/etc/fstab#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:282 #, no-wrap msgid "" "# Device Mountpoint FStype Options Dump Pass#\n" "devfs /compat/ubuntu/dev devfs rw,late 0 0\n" "tmpfs /compat/ubuntu/dev/shm tmpfs rw,late,size=1g,mode=1777 0 0\n" "fdescfs /compat/ubuntu/dev/fd fdescfs rw,late,linrdlnk 0 0\n" "linprocfs /compat/ubuntu/proc linprocfs rw,late 0 0\n" "linsysfs /compat/ubuntu/sys linsysfs rw,late 0 0\n" "/tmp /compat/ubuntu/tmp nullfs rw,late 0 0\n" "/home /compat/ubuntu/home nullfs rw,late 0 0\n" msgstr "" "# Device Mountpoint FStype Options Dump Pass#\n" "devfs /compat/ubuntu/dev devfs rw,late 0 0\n" "tmpfs /compat/ubuntu/dev/shm tmpfs rw,late,size=1g,mode=1777 0 0\n" "fdescfs /compat/ubuntu/dev/fd fdescfs rw,late,linrdlnk 0 0\n" "linprocfs /compat/ubuntu/proc linprocfs rw,late 0 0\n" "linsysfs /compat/ubuntu/sys linsysfs rw,late 0 0\n" "/tmp /compat/ubuntu/tmp nullfs rw,late 0 0\n" "/home /compat/ubuntu/home nullfs rw,late 0 0\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:285 msgid "Then execute man:mount[8]:" msgstr "Затем выполните man:mount[8]:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:289 #, no-wrap msgid "# mount -al\n" msgstr "# mount -al\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:293 msgid "To access the system using man:chroot[8] execute the following command:" msgstr "" "Для доступа к системе с использованием man:chroot[8] выполните следующую " "команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:297 #, no-wrap msgid "# chroot /compat/ubuntu /bin/bash\n" msgstr "# chroot /compat/ubuntu /bin/bash\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:300 msgid "Then man:uname[1] can be executed to check the Linux environment:" msgstr "Тогда можно выполнить man:uname[1], чтобы проверить окружение Linux:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:304 #, no-wrap msgid "# uname -s -r -m\n" msgstr "# uname -s -r -m\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:311 #, no-wrap msgid "Linux 5.15.0 x86_64\n" msgstr "Linux 5.15.0 x86_64\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:315 msgid "" "Once inside the chroot, the system behaves as in a normal Ubuntu " "installation. While systemd doesn't work, the man:service[8] command works " "as usual." msgstr "" "Оказавшись в chroot, система ведёт себя как при обычной установке Ubuntu. " "Хотя systemd не работает, команда man:service[8] функционирует в обычном " "режиме." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:319 msgid "" "To add the package repositories missing from defaults edit the file [." "filename]#/compat/ubuntu/etc/apt/sources.list#." msgstr "" "Чтобы добавить отсутствующие репозитории пакетов по умолчанию, " "отредактируйте файл [.filename]#/compat/ubuntu/etc/apt/sources.list#." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:321 msgid "For amd64 the following example can be used:" msgstr "Для amd64 можно использовать следующий пример:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:328 #, no-wrap msgid "" "deb http://archive.ubuntu.com/ubuntu jammy main universe restricted multiverse\n" "deb http://security.ubuntu.com/ubuntu/ jammy-security universe multiverse restricted main\n" "deb http://archive.ubuntu.com/ubuntu jammy-backports universe multiverse restricted main\n" "deb http://archive.ubuntu.com/ubuntu jammy-updates universe multiverse restricted main\n" msgstr "" "deb http://archive.ubuntu.com/ubuntu jammy main universe restricted " "multiverse\n" "deb http://security.ubuntu.com/ubuntu/ jammy-security universe multiverse " "restricted main\n" "deb http://archive.ubuntu.com/ubuntu jammy-backports universe multiverse " "restricted main\n" "deb http://archive.ubuntu.com/ubuntu jammy-updates universe multiverse " "restricted main\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:331 msgid "For arm64 this other example can be used:" msgstr "Для arm64 можно использовать следующий пример:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:335 #, no-wrap msgid "deb http://ports.ubuntu.com/ubuntu-ports bionic main universe restricted multiverse\n" msgstr "deb http://ports.ubuntu.com/ubuntu-ports bionic main universe restricted multiverse\n" #. type: Title == #: documentation/content/en/books/handbook/linuxemu/_index.adoc:339 #, no-wrap msgid "Advanced Topics" msgstr "Сложные темы" #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:342 msgid "" "A list of all Linux-related man:sysctl[8] knobs can be found in man:linux[4]." msgstr "" "Список всех параметров man:sysctl[8], связанных с Linux, можно найти в man:" "linux[4]." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:344 msgid "Some applications require specific filesystems to be mounted." msgstr "Некоторые приложения требуют подключения определённых файловых систем." #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:346 msgid "" "This is normally handled by the [.filename]#/etc/rc.d/linux# script but can " "be disabled at boot executing the following command:" msgstr "" "Обычно это обрабатывается скриптом [.filename]#/etc/rc.d/linux#, но можно " "отключить при загрузке, выполнив следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:350 #, no-wrap msgid "sysrc linux_mounts_enable=\"NO\"\n" msgstr "sysrc linux_mounts_enable=\"NO\"\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:353 msgid "" "Filesystems mounted by the rc script will not work for Linux processes " "inside chroots or jails; if needed, configure them in [.filename]#/etc/" "fstab#:" msgstr "" "Файловые системы, смонтированные скриптом rc, не будут работать для Linux-" "процессов внутри chroot или клетки. При необходимости настройте их в [." "filename]#/etc/fstab#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:361 #, no-wrap msgid "" "devfs /compat/linux/dev devfs rw,late 0 0\n" "tmpfs /compat/linux/dev/shm tmpfs rw,late,size=1g,mode=1777 0 0\n" "fdescfs /compat/linux/dev/fd fdescfs rw,late,linrdlnk 0 0\n" "linprocfs /compat/linux/proc linprocfs rw,late 0 0\n" "linsysfs /compat/linux/sys linsysfs rw,late 0 0\n" msgstr "" "devfs /compat/linux/dev devfs rw,late 0 0\n" "tmpfs /compat/linux/dev/shm tmpfs rw,late,size=1g,mode=1777 0 0\n" "fdescfs /compat/linux/dev/fd fdescfs rw,late,linrdlnk 0 0\n" "linprocfs /compat/linux/proc linprocfs rw,late 0 0\n" "linsysfs /compat/linux/sys linsysfs rw,late 0 0\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:364 msgid "" "Since the Linux binary compatibility layer has gained support for running " "both 32- and 64-bit Linux binaries, it is no longer possible to link the " "emulation functionality statically into a custom kernel." msgstr "" "Поскольку уровень двоичной совместимости с Linux получил поддержку " "выполнения как 32-, так и 64-битных бинарных файлов Linux, стало невозможно " "статически линковать функциональность эмуляции в пользовательское ядро." #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:366 #, no-wrap msgid "Installing Additional Libraries Manually" msgstr "Установка дополнительных библиотек вручную" #. type: delimited block = 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:371 msgid "" "For base system subdirectories created with man:debootstrap[8], use the " "instructions above instead." msgstr "" "Для подкаталогов базовой системы, созданных с помощью man:debootstrap[8], " "используйте приведённые выше инструкции." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:374 msgid "" "If a Linux application complains about missing shared libraries after " "configuring Linux binary compatibility, determine which shared libraries the " "Linux binary needs and install them manually." msgstr "" "Если приложение Linux жалуется на отсутствие общих библиотек после настройки " "совместимости с двоичными файлами Linux, определите, какие общие библиотеки " "нужны двоичному файлу Linux, и установите их вручную." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:376 msgid "" "From a Linux system using the same CPU architecture, `ldd` can be used to " "determine which shared libraries the application needs." msgstr "" "С системы Linux с той же архитектурой CPU можно использовать `ldd` для " "определения того, какие разделяемые библиотеки необходимы приложению." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:378 msgid "" "For example, to check which shared libraries `linuxdoom` needs, run this " "command from a Linux system that has Doom installed:" msgstr "" "Например, чтобы проверить, какие разделяемые библиотеки требуются для " "`linuxdoom`, выполните следующую команду в системе Linux, где установлен " "Doom:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:382 #, no-wrap msgid "% ldd linuxdoom\n" msgstr "% ldd linuxdoom\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:391 #, no-wrap msgid "" "libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0\n" "libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0\n" "libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29\n" msgstr "" "libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0\n" "libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0\n" "libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:395 msgid "" "Then, copy all the files in the last column of the output from the Linux " "system into [.filename]#/compat/linux# on the FreeBSD system. Once copied, " "create symbolic links to the names in the first column." msgstr "" "Затем скопируйте все файлы из последнего столбца вывода с системы Linux в [." "filename]#/compat/linux# на системе FreeBSD. После копирования создайте " "символические ссылки на имена из первого столбца." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:397 msgid "This example will result in the following files on the FreeBSD system:" msgstr "Этот пример приведёт к следующим файлам в системе FreeBSD:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:406 #, no-wrap msgid "" "/compat/linux/usr/X11/lib/libXt.so.3.1.0\n" "/compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0\n" "/compat/linux/usr/X11/lib/libX11.so.3.1.0\n" "/compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0\n" "/compat/linux/lib/libc.so.4.6.29\n" "/compat/linux/lib/libc.so.4 -> libc.so.4.6.29\n" msgstr "" "/compat/linux/usr/X11/lib/libXt.so.3.1.0\n" "/compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0\n" "/compat/linux/usr/X11/lib/libX11.so.3.1.0\n" "/compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0\n" "/compat/linux/lib/libc.so.4.6.29\n" "/compat/linux/lib/libc.so.4 -> libc.so.4.6.29\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:411 msgid "" "If a Linux shared library already exists with a matching major revision " "number to the first column of the `ldd` output, it does not need to be " "copied to the file named in the last column, as the existing library should " "work. It is advisable to copy the shared library if it is a newer version, " "though. The old one can be removed, as long as the symbolic link points to " "the new one." msgstr "" "Если уже существует общая библиотека Linux с соответствующим номером старшей " "версии (первый столбец вывода `ldd`), её не нужно копировать в файл, " "указанный в последнем столбце, так как существующая библиотека должна " "работать. Однако рекомендуется скопировать общую библиотеку, если она " "является более новой версией. Старую версию можно удалить, при условии что " "символическая ссылка указывает на новую." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:413 msgid "For example, these libraries already exist on the FreeBSD system:" msgstr "Например, эти библиотеки уже существуют в системе FreeBSD:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:418 #, no-wrap msgid "" "/compat/linux/lib/libc.so.4.6.27\n" "/compat/linux/lib/libc.so.4 -> libc.so.4.6.27\n" msgstr "" "/compat/linux/lib/libc.so.4.6.27\n" "/compat/linux/lib/libc.so.4 -> libc.so.4.6.27\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:421 msgid "and `ldd` indicates that a binary requires a later version:" msgstr "" "и `ldd` показывает, что для бинарного файла требуется более новая версия:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:425 #, no-wrap msgid "libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29\n" msgstr "libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:429 msgid "" "Since the existing library is only one or two versions out of date in the " "last digit, the program should still work with the slightly older version. " "However, it is safe to replace the existing [.filename]#libc.so# with the " "newer version:" msgstr "" "Поскольку существующая библиотека устарела всего на одну или две версии в " "последней цифре, программа должна по-прежнему работать с немного более " "старой версией. Однако можно безопасно заменить существующий [." "filename]#libc.so# на более новую версию:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:434 #, no-wrap msgid "" "/compat/linux/lib/libc.so.4.6.29\n" "/compat/linux/lib/libc.so.4 -> libc.so.4.6.29\n" msgstr "" "/compat/linux/lib/libc.so.4.6.29\n" "/compat/linux/lib/libc.so.4 -> libc.so.4.6.29\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:438 msgid "" "Generally, one will need to look for the shared libraries that Linux " "binaries depend on only the first few times that a Linux program is " "installed on FreeBSD. After a while, there will be a sufficient set of " "Linux shared libraries on the system to be able to run newly installed Linux " "binaries without any extra work." msgstr "" "Как правило, необходимость искать разделяемые библиотеки, от которых зависят " "Linux-бинарники, возникает только в первые несколько раз при установке Linux-" "программ на FreeBSD. Через некоторое время в системе накопится достаточный " "набор разделяемых библиотек Linux, что позволит запускать вновь " "устанавливаемые Linux-бинарники без дополнительных усилий." #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:439 #, no-wrap msgid "Branding Linux ELF Binaries" msgstr "Маркировка ELF-бинарников Linux" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:442 msgid "" "The FreeBSD kernel uses several methods to determine if the binary to be " "executed is a Linux one: it checks the brand in the ELF file header, looks " "for known ELF interpreter paths and checks ELF notes; finally, by default, " "unbranded ELF executables are assumed to be Linux anyway." msgstr "" "Ядро FreeBSD использует несколько методов для определения, является ли " "запускаемый двоичный файл Linux-программой: оно проверяет бренд в заголовке " "ELF-файла, ищет известные пути к ELF-интерпретаторам и проверяет ELF-" "заметки; наконец, по умолчанию небрендированные ELF-исполняемые файлы в " "любом случае считаются Linux-программами." #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:444 msgid "" "Should all those methods fail, an attempt to execute the binary might result " "in error message:" msgstr "" "Если все эти методы не сработают, попытка выполнить двоичный файл может " "привести к сообщению об ошибке:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:448 #, no-wrap msgid "% ./my-linux-elf-binary\n" msgstr "% ./my-linux-elf-binary\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:456 #, no-wrap msgid "" "ELF binary type not known\n" "Abort\n" msgstr "" "ELF binary type not known\n" "Abort\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:459 msgid "" "To help the FreeBSD kernel distinguish between a FreeBSD ELF binary and a " "Linux binary, use man:brandelf[1]:" msgstr "" "Чтобы помочь ядру FreeBSD отличить ELF-программу FreeBSD от Linux-программы, " "используйте man:brandelf[1]:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:463 #, no-wrap msgid "% brandelf -t Linux my-linux-elf-binary\n" msgstr "% brandelf -t Linux my-linux-elf-binary\n" #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:465 #, no-wrap msgid "Installing a Linux RPM Based Application" msgstr "Установка приложения на основе Linux RPM" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:469 msgid "" "To install a Linux RPM-based application, first install the package:" "archivers/rpm4[] package or port. Once installed, `root` can use this " "command to install a [.filename]#.rpm#:" msgstr "" "Для установки приложения на основе RPM в Linux сначала установите пакет " "package:archivers/rpm4[] или порт. После установки пользователь `root` может " "использовать следующую команду для установки файла [.filename]#.rpm#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:474 #, no-wrap msgid "" "# cd /compat/linux\n" "# rpm2cpio < /path/to/linux.archive.rpm | cpio -id\n" msgstr "" "# cd /compat/linux\n" "# rpm2cpio < /path/to/linux.archive.rpm | cpio -id\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:478 msgid "" "If necessary, `brandelf` the installed ELF binaries. Note that this will " "prevent a clean uninstall." msgstr "" "При необходимости выполните `brandelf` для установленных ELF-бинарников. " "Заметим, что это сделает невозможной чистую деинсталляцию." #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:479 #, no-wrap msgid "Configuring the Hostname Resolver" msgstr "Настройка преобразователя имён хостов" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:482 msgid "If DNS does not work or this error appears:" msgstr "Если DNS не работает или появляется эта ошибка:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:487 #, no-wrap msgid "" "resolv+: \"bind\" is an invalid keyword resolv+:\n" "\"hosts\" is an invalid keyword\n" msgstr "" "resolv+: \"bind\" is an invalid keyword resolv+:\n" "\"hosts\" is an invalid keyword\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:490 msgid "configure [.filename]#/compat/linux/etc/host.conf# as follows:" msgstr "" "Настройте файл [.filename]#/compat/linux/etc/host.conf# следующим образом:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/linuxemu/_index.adoc:495 #, no-wrap msgid "" "order hosts, bind\n" "multi on\n" msgstr "" "order hosts, bind\n" "multi on\n" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:500 msgid "" "This specifies that [.filename]#/etc/hosts# is searched first and DNS is " "searched second. When [.filename]#/compat/linux/etc/host.conf# does not " "exist, Linux applications use [.filename]#/etc/host.conf# in the host system " "but they complain since that file does not exist in FreeBSD. Remove `bind` " "if a name server is not configured using [.filename]#/etc/resolv.conf#." msgstr "" "Это указывает, что сначала выполняется поиск в [.filename]#/etc/hosts#, а " "затем в DNS. Если [.filename]#/compat/linux/etc/host.conf# отсутствует, " "Linux-приложения используют [.filename]#/etc/host.conf# основной системы, но " "выдают ошибку, так как этот файл отсутствует в FreeBSD. Удалите `bind`, если " "сервер имён не настроен в [.filename]#/etc/resolv.conf#." #. type: Title === #: documentation/content/en/books/handbook/linuxemu/_index.adoc:502 #, no-wrap msgid "Miscellaneous" msgstr "Разное" #. type: Plain text #: documentation/content/en/books/handbook/linuxemu/_index.adoc:504 msgid "" "More information on how binary compatibility works with Linux(R) can be " "found in the article link:{linux-emulation}[Linux emulation in FreeBSD]." msgstr "" "Дополнительная информация о работе двоичной совместимости с Linux(R) " "доступна в статье link:{linux-emulation}[Эмуляция Linux в FreeBSD]."