Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah this is OK, but running macOS commands for Linux deployments doesn't work all the time. What about `lsblk` or `ip`? Also md5 vs md5sum. Also and I don't have macOS handy to try it, I'm pretty sure grep has differing options. I can't count how many times friends and colleagues who use macOS for development have put BSD commands into Dockerfiles and CI pipelines and have wondered why it didn't work.


Your criticism is valid, but its possible to get compatibility between macOS (or another BSD) and Linux. GNU utilities are already mentioned but there's also, for example,

> What about `lsblk` or `ip`?

For a (partly compatible) equivalent to ip I can recommend iproute2mac [1]. You can also use the old utilities from BSD (ifconfig, route, etc) or the GUI.

For lsblk I found no drop-in replacement, just equivalents [2]

On top of that, Nix works on Linux and macOS.

[1] https://github.com/brona/iproute2mac

[2] https://apple.stackexchange.com/questions/107953/list-all-de...

[3] https://nixos.org


This was a massive problem for me as well. And they laughed at me using a virtual machine with Linux in it while they were pissing around with broken stuff...


When I was given a macbook at work I used to curse all the time at mac os' grep which is not gnu grep, and lacks a lot of nice cool features...


You can use brew to install gnu grep as a replacement.


Its funny how people will admit to being upset about something when they are supposed to be tech saavy and should have just googled the solution .


on my work MacBook we can't just brew install things, no admin permissions except for whitelisted things


Thank god somebody understands that not everybody is given toy macbooks to install whatever they like with no screening and/or block list.


You can install brew to any directory, including your home directory.


Lucky that you can install homebrew into your home directory with no admin rights then!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: