-2

Is there like some sort of Linux layer for macOS? I've seen some projects that can only run on Linux because they require the Linux kernel to work. Something like Cygwin maybe.

Thanks

John James
  • 83
  • 6
  • I think you may google for `homebrew` on Mac OS and check how to port the projects on it. – 0andriy May 27 '17 at 12:09
  • You you are looking for is to use [docker](https://www.docker.com), [vagrant](https://www.vagrantup.com) or simply to have a [virtual box](https://www.virtualbox.org). That said, asking us to find tools is not really the purpose of StackOverflow. – β.εηοιτ.βε May 28 '17 at 11:23

1 Answers1

1

I haven't come across any Linux-on-macOS system other than full virtualisation with software such as VMWare Fusion, Parallels, VirtualBox, or xhyve.

macOS does implement (most of) POSIX; it also shares some of the BSDs' APIs such as kqueue/kevent, plus of course a bunch of custom user-kernel APIs, some of them inherited from Mach. There's also an X11 implementation. (although the results are rarely particularly attractive) A lot of Linux kernel APIs do have macOS equivalents, even if they're not identical. You should be able to port many (most?) projects which currently only work on Linux to the Mac; the amount of effort involved will of course vary. It'll usually be easier if it already works on a BSD.

You'll need to be more specific to get a more specific answer.

pmdj
  • 22,018
  • 3
  • 52
  • 103
  • Ok, to be more specific [Anbox](https://github.com/anbox/anbox) – John James May 27 '17 at 10:13
  • There's no support for containerisation in the xnu kernel, so I'm afraid that kind of software is already not possible on macOS on a conceptual level. – pmdj May 27 '17 at 12:18