10 ms·
macOS Subsystem for Linux
- drekipus 4y agoI thought it was "macOS subsystem, for Linux" and got excited before realising it's the other way around. What do Mac users get out of this? I thought most Linux things work reasonably well already
- SllX 4y agoFQA's got this covered: ======================== > Q: Why the same naming scheme as WSL? > A: It's a proof of concept name only. If I were to distribute this as a finished piece of software, which I probably won't (see why below) I would choose a different name. > Q: Isn't this literally just a QEMU virtual machine? How simple is that! > A: Yes, it is. And yes, it's simple. Why did I choose to put this on my Twitter, you ask? Because I couldn't find something exactly like what I did, and because before I posted it, I had 50 Twitter followers, total. I did not expect to get the over 700 likes that it did when I posted it; as a matter of fact, I would have been perfectly satisfied if it had gotten 7 likes. > Q: What, you won't be distributing this as a finished piece of software!? Why? > A: From what I can tell (and admittedly, I haven't tested this piece of software), it already exists. Lima seems to have a lot more features (such as file sharing, something that I have not implemented) and seems to be geared towards a different application (containers).
- classified 4y agoI love "FQA", as in "Frequently Questioned Answers" :)
- anta40 4y agoRunning 32-bit apps, for example. I sometimes code in assembly for fun (my professional work is mobile app developer, though). One of my favorite assemblers is FASM: https://flatassembler.net/ https://flatassembler.net/ It's still written in 32-bit assembly, which means it won't run on any macOS since Catalina. On the other side, Linux still provide 32-bit compatibility mode.
- jonas-w 4y agoThe other way around would be https://github.com/darlinghq/darling https://github.com/darlinghq/darling
- rollcat 4y agoIn an ideal world, we wouldn't need to be bothered with Linux-only software. It's incredibly frustrating not only on Mac, but e.g. on OpenBSD as well. Docker (and Kubernetes) are a prime example, but it's increasingly bothersome to work around dependencies on systemd, logind, etc. Linux software is starting to feel like Windows software: it's this special other thing that requires extra steps and care to run on your machine, and the user experience is far from smooth, if things work at all. Also: https://news.ycombinator.com/item?id=31842318 https://news.ycombinator.com/item?id=31842318
- ar_lan 4y agoFor at least the last year I’ve ran my entire dev environment out of a Linux VM I ssh into (locally). The primary factors are: 1. I, overall, like macOS and the Apple ecosystem. I heavily use Notes, my calendar, several apps I like to sync from my iPad and phone, etc. I'm pretty bought-in, and macOS helps me manage the non-developer stuff a lot easier, in my opinion. 2. Enough things have broken, over time, from macOS updates that my developer experience is subpar compared to a Linux OS. 3. A Linux VM gives me 100% reproducibility, so little delay that I would argue to say there is no delay, and I can reliably use the rest of my MacBook for all the other apps I care about. It’s worked great, and I’ve never felt like it’s complicated. Edit: Some people might mention Docker. I've run into just-enough networking issues with Docker that the full VM was worth running.
- classified 4y agoOh, no, not more of this backwards mis-naming illogic. It's bad enough that MS abuses us with such idiocy, we don't have to copy it.
- privacyking 4y agoI too was scratching my head as to why anyone would ever want to run a macOS terminal from within linux.
- lapser 4y agoI've wanted to do it. Mostly to test out stuff that my colleagues would need to run but haven't been able because I run Linux. So I usually have to ask colleagues to double check my work. I am aware that running macOS on non-Apple hardwade would be against their ToS.
- kergonath 4y agoYou kid, but I often wish I could run iTerm on my Linux workstations.
- Fnoord 4y agoI've switched from iTerm2 to Alacritty. It requires a different config per OS, but it works cross-platform. I combine it with tmux.
- Deukhoofd 4y agoI'd love to have a simple way to compile stuff for macOS from Linux.
- e12e 4y agoFor running xcode and building ios apps in a ci pipeline? Eg with darling[1] and godot: https://docs.godotengine.org/en/3.6/development/compiling/cross-compiling_for_ios_on_linux.html https://docs.godotengine.org/en/3.6/development/compiling/cr... [1] https://www.darlinghq.org/ https://www.darlinghq.org/
- 4y ago
- lapser 4y agoYou can just use Vagrant for this kind of setup. The benefit of that is you can provision so it is able to run your application and you're able to commit it to git and share it with others. Pretty sure it will have a qemu adapter too if you so choose.
- westurner 4y agobrew install vagrant packer terraform Podman Desktop is Apache 2.0 open source; supports Win, Mac, Lin; supports Docker Desktop plugins; and has plugins for Podman, Docker, Lima, and CRC/OpenShift Local (k8s) https://github.com/containers/podman-desktop https://github.com/containers/podman-desktop : brew install podman-desktop /? vagrant Kubernetes MacOS https://www.google.com/search?q=vagrant+Kubernetes+macos https://www.google.com/search?q=vagrant+Kubernetes+macos You get all that put together one time on one box and realize you could have scripted the whole thing, but you need bash 4+ or Python 3+ so it all depends on `brew` first: https://github.com/geerlingguy/ansible-for-kubernetes/blob/master/ansible-containers/main.yml https://github.com/geerlingguy/ansible-for-kubernetes/blob/m... The Ansible homebrew module can install and upgrade brew and install and upgrade packages with brew: https://docs.ansible.com/ansible/latest/collections/community/general/homebrew_module.html#examples https://docs.ansible.com/ansible/latest/collections/communit... And then write tests for the development environment too, or only for container specs in production: https://github.com/geerlingguy/ansible-for-kubernetes/tree/master/testing-molecule-kind#running-tests https://github.com/geerlingguy/ansible-for-kubernetes/tree/m... : brew install kind docker type -a python3; python3 -m site python3 -m pip install molecule ansible-test yamllint # molecule converge; ssh -- hostname molecule test # molecule destroy westurner/dotfiles/scripts/upgrade_mac.sh: https://github.com/westurner/dotfiles/blob/develop/scripts/upgrade_mac.sh https://github.com/westurner/dotfiles/blob/develop/scripts/u...
- westurner 4y agoPerhaps not that OT, but FWIW I just explained exactly this in a tweet: > Mambaforge-pypy3 for Linux, OSX, Windows installs from conda-forge by default. (@condaforge builds packages with CI for you without having to install local xcode IIRC) conda install -c conda-forge -y nodejs mamba install -y nodejs https://github.com/conda-forge/miniforge#mambaforge-pypy3 https://github.com/conda-forge/miniforge#mambaforge-pypy3
- cookiengineer 4y agoIs there a Linux Subsystem for MacOS? I know about Darling [1] but don't know about how practical it can be because I'm assuming all proprietary frameworks like the core web framework aren't implemented there. [1] https://github.com/darlinghq/darling https://github.com/darlinghq/darling
- jokethrowaway 4y agoThis is a qemu tutorial with a flashy name. You probably want Lima anyway
- TheRealPomax 4y agoQ: What, you won't be distributing this as a finished piece of software!? Why? A: From what I can tell (and admittedly, I haven't tested this piece of software), it already exists. Lima seems to have a lot more features (such as file sharing, something that I have not implemented) and seems to be geared towards a different application (containers).
- shmerl 4y agoIt's a poorly chosen name, same as in "Windows subsystem for Linux". It should be called Linux subsystem for macOS if they really need such kind of combination.
- TheRealPomax 4y agoGood news, the page literally addresses that. Just because it made HN doesn't mean it's a real thing: this is barely a proof of concept, it doesn't need a good name =)
- em500 4y agoHere's a relevant comment from a Microsoft product manager[1]: > Because we cannot name something leading with a trademark owned by someone else. > It's pretty much the same reason why you can't launch a commercial product called "Apple <product-name>" unless you're Apple. Or "Adobe <product-name>" unless you're Adobe. Or ... well ... you get the idea ;) [1] https://twitter.com/richturn_ms/status/1245481405947076610 https://twitter.com/richturn_ms/status/1245481405947076610
- saagarjha 4y agoSee also: https://github.com/linux-noah/noah https://github.com/linux-noah/noah
- pajko 4y agoExactly, and there's a binfmt-like autoloader for that: https://github.com/georghe-crihan/imgact_linux https://github.com/georghe-crihan/imgact_linux
- philshem 4y agoMultipass is an option for Ubuntu on MacOS https://multipass.run/ https://multipass.run/
- keyle 4y agoNice one! multipass looks interesting.
- kramerger 4y agoMultipass is somewhat limited, but what it does it does really well. It is supported in Linux, Windows and osx. This means that you can have identical development environment across all your devices using a shared VM script
- bgm1975 4y agoI’ve been using Multipass for a couple years now as my “WSL for Mac”. It’s great to be able to spin up a Linux guest on demand. I also use it for Docker shenanigans so I don’t need Docker Desktop or deal with its licensing issues.
- sgarland 4y agoI start a small Minikube instance and then hook its Docker daemon back to my Mac terminal. Either way is absurd, tbh, but here we are.
- tdsanchez 4y agoI came here to say this. Multipass is a solid tool. https://itdeepdive.com/2020/10/kubernetes-multi-node-cluster-with-multipass/ https://itdeepdive.com/2020/10/kubernetes-multi-node-cluster...
- Fnoord 4y agoThe WSL naming is terrible and stems from a time where Microsoft was an evil monopoly empire, and used all kind of doublespeak regarding Linux, GPL, etc (see Halloween documents). The name stems from its predecessor, Windows Services For Unix (SFU) [1]. Its bad enough Microsoft kept using the doublespeak naming scheme, please don't copy it. What this is, is Linux compatibility layer (running on MacOS). BSDs have (or used to have) such as well, at least FreeBSD used to. [1] https://en.m.wikipedia.org/wiki/Windows_Services_for_UNIX https://en.m.wikipedia.org/wiki/Windows_Services_for_UNIX
- solarkraft 4y agoWhat makes this better than Lima? Not that I'm trying to discourage anything here, building things is cool.
- pickleMeTimbers 4y agoThis is also achieved through: 1) https://github.com/lima-vm/lima https://github.com/lima-vm/lima 2) https://github.com/beringresearch/macpine https://github.com/beringresearch/macpine With a nice CLI included.
- deleted 4y ago[deleted]
- dzsekijo 4y agoI use Xhyve to spawn a Linux VM on Mac. For what I need it works well, so I haven't looked for alternatives. How that compares to Qemu?
- highwaylights 4y agoThe problem with each of these tools (Lima etc.) is that it’s still fundamentally a virtual machine under the covers. The great thing for me about WSL (and why IMHO it was worth all the effort they put into it), is that because the kernel process tree is running as a native Windows process tree, I don’t have to pre-allocate memory ahead of time. This is murder on Apple’s RAM-restricted laptops, and kind of rubbish on machines with massive RAM too. Most of the time, most of your memory goes unused. The base model Airs/Pros for example need to have 25-50% of your RAM locked away just to run a Linux container at all - when you already have a fairly anaemic 8GB to begin with that’s pretty dire.
- augustl 4y agoIt's a shame they essentially deprecated WSL1 and is doing everything in WSL2 now, where exactly this kind of memory allocation and the performance issues that entails is an issue. Not that I think it's a bad decision, but I wish they somehow managed to break Conway's Law and enhance Windows itself by fixing the file system speed issues as well as somehow making NT/Windows processes fork instantaneously just like on Linux :)
- baq 4y agoTheir explanation was that Windows could not be enhanced but rather should be slimmed down - the APIs that the NT kernel provides can't be efficiently worked around without breaking all kinds of already existing Windows software.
- jstarks 4y agoWe work very closely across the file system, kernel, and virtualization teams, so I don’t think we can blame Conway’s Law for WSL2. And actually our WSL1 fork performance wasn’t too bad IIRC—we have real fork at the Windows kernel level, it’s just not something that can realistically work with the Win32 programming model. I also think we will eventually resolve the file system performance issues. No, the most important reason to choose a VM instead of a reimplementation of the Linux ABI is long tail compatibility. You can’t realistically replicate and then keep up with every corner of the Linux kernel’s interface. And so with WSL1, software will randomly not work, or it will randomly break after an apt upgrade, and users will get frustrated and switch to a VM anyway. Might as well get perfect compatibility and still have nice integration with Windows via the WSL2 approach.
- nottorp 4y agoAnyone else reading the title as the reverse of what it actually is? I thought it's something for running (some parts of) MacOS on Linux. Not the other way round.
- jagged-chisel 4y agoSame here. But it does follow WSL naming.
- andybak 4y agoYes. It's using the same naming as WSL which always confused me: Q: Why the same naming scheme as WSL? A: It's a proof of concept name only. If I were to distribute this as a finished piece of software, which I probably won't (see why below) I would choose a different name.
- unsafecast 4y agoIt's not confusing once you know where it came from. The NT kernel has a concept called “environment subsystems”. Win32 was, until WSL1, the only one used (a long time ago there was SFU, the grandfather of WSL). So WSL is a Windows subsystem made for Linux. Hence the name. Note that WSL2 isn't an NT subsystem, they're just using an actual kernel now. The name stuck though.
- tzs 4y agoThe original NT subsystems were for OS/2, POSIX, and Win32 and were called simply the "OS/2 Subsystem", "POSIX Subsystem", and "Win32 Subsystem". If they had stuck with the sensible NT naming convention, WLS would have simply been the Linux Subsystem.
- unsafecast 4y agoFair point. I was just arguing that it technically makes sense. The naming thing kind of started with SFU though.
- 4y ago
- Hackbraten 4y agoBecause we’re not saying it often enough: Kudos to the author for going out of their way and writing meticulously detailed step-by-step instructions. That README shows a great deal of appreciation for other people’s time, which should be commended.
- robohoe 4y agoI personally like these detailed step by step readmes. It’s helpful for someone clueless dropping in to get quickly started and develop a working prototype. Too many times you’re left to your own devices when setting up dependencies. I totally understand if you’re expected to do some homework. On another hand, it certainly helps to gently guide the reader versus give them a high level request to install this or that.
- darkwater 4y agoOnce upon a time these were usually posts on one own blog (self-hosted or not), started with a HOWTO keyword and helped the people just in the same way. Nowadays everything developer must be on GitHub or it won't ever be noticed. /Old man yells at clouds
- lazyier 4y agoIt is an improvement. Having documentation include with source code means that they can updated together and is less likely to be out of date. Provided, of course, they don't use the github wiki stuff or use separate repos for documentation.
- zymhan 4y agoThere's probably something to be said for the easy of editing a markdown file and pushing it to github, versus using some crummy blog platform. In addition to the fact that folks can submit a PR (or fork) to update the instructions if something goes out of date.
- Qub3d 4y agoI host my blog using GitHub pages and hugo. Its all still markdown, but it also allows people to go to my vanity url and see stuff formatted exactly as I want it to be.
- Kukumber 4y agoWhy reuse the horrible name microsoft uses to describe using a VM? I'm loosing hope for anything tech related these days, just bad and concerning
- WuRB3u27qAqegA8 4y agoI suspect you can get rid of all the post-install steps by just installing it over a serial console in the first place (`-nographic` might even make it all automatic, I dunno). See f.e. https://www.debian.org/releases/stable/i386/ch05s03.en.html https://www.debian.org/releases/stable/i386/ch05s03.en.html https://teklager.se/en/knowledge-base/installing-debian-over-serial-console-apu-board/ https://teklager.se/en/knowledge-base/installing-debian-over...
- monster2control 4y agoI just don’t see why this is needed. Almost everything on Linux has a homebrew version available. Perhaps it could be helpful for pure development needs. I guess.
- jrm4 4y agoHa: I appreciate having to give it the stupid backwards name because that's what MS did, but unfortunately it's still a stupid backwards name.
- jeroen79 4y agoThis should be called linux subsystem for macOS not the other way aroud.
- MuffinFlavored 4y agoMight be even easier to provide (hopefully trustworthy and safe) `msl.qcow2` Debian images with the installation and `GRUB` modifications already done?
- enmity 4y agoIt will be a while before we're able to have decent support. This is an interesting initiative to follow: https://macoscontainers.org/ https://macoscontainers.org/
- MR4D 4y agoMy personal favorite on the page: “ Q: You're an idiot. A: Very true, but that's not a question. “
- simonblack 4y agoIs there a call for MSL, seeing that MacOS is based on BSD UNIX? Wouldn't there be a lot of redundancy in having both?