Ask HN: How do you run Linux tools on macOS

3 points by enedil ↗ HN
I've been using Linux on my MacBook for several years and now I'm considering switching back. However, there are lots of tools (mostly command line) that I used, and from what I remember, a lot of them had little quirks, installation was from times to times cumbersome, sometimes they'll bug on something etc, etc. That's why I thought about running Linux directly - preferably with access from terminal. I don't suspect that I'll need to run GUI apps. Filesystem synchronisation is a must though (I would appreciate if macos root filesystem was mounted somewhere, and conversely, linux root is mounted somewhere).

I would like to avoid VirtualBox and other traditional solutions, as they bring much overhead. What are some reliable setups?

5 comments

[ 5.0 ms ] story [ 16.8 ms ] thread
Homebrew where the package is available and Docker where it's not. But I'd just stay with Linux. The only reason I'm using homebrew is because new MBP is broken enough it can't run Linux natively.
brew install coreutils findutils gnu-sed gnu-awk curl ...

And add coreutils to your path:

export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"

Pkgsrc is pretty good, though it often doesn't have the latest shiny util or tool.

https://pkgsrc.joyent.com/install-on-osx/

Can you share a quick pros/cons vs brew and/or macports?
Sorry, I've not used brew or macports. I also use NetBSD and SmartOS, and they too use pkgsrc so my familiarity with it might be some of the reason I use it.