2

is it possible at to run Linux applications on a FreeBSD machine? How can I do it? Thank in advance !

  • 2
    Read this: freebsd.org/doc/handbook/linuxemu.html – Bob Aug 11 '18 at 5:33
  • You could use a Linux virtual machine on top of FreeBSD. What is the application you'd like to run? – Kusalananda Aug 11 '18 at 7:13
  • As always, most FreeBSD questions are answered in The Handbook as linked to by @Bob . In most cases, there is a port/pkg of the same application from Linux available on FreeBSD. – Rob Aug 11 '18 at 10:44
  • FreeBSD has a Linux subsystem which does run Linux applications natively w/o a need to recompile. Read up on that on freebsd.org where there are plenty of resources. – ajeh Aug 11 '18 at 18:02
2
  • Ports/packages There are tens of thousands of softwares in the ports/packages collection, installable and built from source on one's system in /usr/ports/ (with options that one can configure to one's local system) or available as pre-built binaries from the FreeBSD package repositories. It's quite likely that whatever you want to run has already been included.
  • Binary compatibility There's a subsystem in the FreeBSD kernel that can emulate many Linux system calls and the Linux /compat/linux/proc/ filesystem, although it deliberately does not provide some architecture-specific Linuxisms, for running Linux binaries. In contrast, note, ports/packages are native FreeBSD programs, compiled tailored to FreeBSD and its libraries.

This is all documented in the FreeBSD Handbook.

OpenBSD and NetBSD have ports/packages systems, too. NetBSD refers to it as just the packages collection, because in NetBSD jargon "ports" are ports of the operating system to different platforms and architectures. NetBSD has a similar binary compatibility layer, likewise documented in the NetBSD Guide.

0

If the source is available, try compiling it within FreeBSD. If not, use the Linux compatibility layer as others have mentioned.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.