News for hackers. Stuff that matters.
Re:Ask HN: What are the best maintained how-to sites for Linux? by smoldesu on Friday April 30, 2021 @05:54PM (#26999865)
Just as a heads up, Linux and MacOS are not going to be "the same" in the terminal. While they're certainly more similar than say, the Windows command line or Powershell, the Darwin tooling doesn't quite match up with Linux on several occasions. Especially once you try extending your workspace, you'll run into some immediate party-stoppers. I like Homebrew and MacPorts, but neither of them are good enough to be a true "package manager" for MacOS, and it completely undermines the great Unix heritage that MacOS builds upon.

OP, you might be caught between a rock and a hard place here: if you're already familiar with your terminal and piping from stdin/stdout, there's not really a whole lot more to learn. Apple isn't very forthcoming with details on the inner workings of MacOS either, so you're going to have a tough time fully grokking how to use the command line effectively. And even if you do manage to figure it all out, you're only trapped with what they give you.

My advice? Learn ssh, and use it to connect to a real Linux box. That's how 90% of sysadmins do their work, it's how you should do it too.

Re:Ask HN: What are the best maintained how-to sites for Linux? by dharmab on Friday April 30, 2021 @06:00PM (#26999946)
Notable examples:

- macOS uses BSD-style coreutils while most Linuxes use GNU coreutils. They have different args, output and behavior in many common cases.

- macOS ships with Bash v4. Bash v5 is a common default package on modern Linuxes.

- While the basic user permissions are the same, the OS security model is entirely different. There's no direct equivalent to namespaces in macOS and no direct equivalent to SIP in Linux.

Re:Ask HN: What are the best maintained how-to sites for Linux? by allarm on Friday April 30, 2021 @09:55PM (#27002157)
MacOS has zsh as a default shell since 2019.
Re:Ask HN: What are the best maintained how-to sites for Linux? by ryapric on Saturday May 01, 2021 @12:44AM (#27003196)
Having `zsh` as a default shell, and having two different versions of `bash` are very different things. That's a bit like saying "macOS ships with IPython as the default Python interactive interpreter" when someone says macOS ships with Python 2.7 when 3.x is available elsewhere.
Re:Ask HN: What are the best maintained how-to sites for Linux? by allarm on Tuesday May 04, 2021 @04:51AM (#27035384)
You are missing the point. I am saying that macos ships with zsh nowadays, having bash 4 installed for legacy compatibility.
Re:Ask HN: What are the best maintained how-to sites for Linux? by Kaze404 on Friday April 30, 2021 @06:07PM (#27000037)
Are there any community efforts on solving those issues?
Re:Ask HN: What are the best maintained how-to sites for Linux? by dharmab on Friday April 30, 2021 @06:19PM (#27000191)
You can download alternative GNU coreutils from Homebrew, but they will need to install under different binary names.

You can download Bash v5 from Homebrew.

Re:Ask HN: What are the best maintained how-to sites for Linux? by davidcollantes on Friday April 30, 2021 @06:09PM (#27000060)
In my opinion, Brew solve the first two.
Re:Ask HN: What are the best maintained how-to sites for Linux? by smoldesu on Friday April 30, 2021 @10:52PM (#27002536)
Brew is a pretty bad solution by any metric but especially here. Brew won't replace your coreutils or change your OS's internal tooling.
Re:Ask HN: What are the best maintained how-to sites for Linux? by thiht on Saturday May 01, 2021 @03:45AM (#27004227)
Thank God it doesn't, what do you want? Subtly breaking everything not written with GNU coreutils in mind?
Re:Ask HN: What are the best maintained how-to sites for Linux? by m463 on Friday April 30, 2021 @07:44PM (#27001103)
I use a mac every day, but I firmly believe apple has completely dropped the ball with respect to using and interoperating with community software.

They should be sponsoring - officially - non-apple software on their platform because it will make their platform stronger and much more useful.

instead, I've seen:

- opensource.apple.com in decline

- other projects dropped or forgotten over the years (no gpl software after 2, xquartz pushed out to pasture, os support for python/etc very poor, many others...)

- focus on apple-specific languages (swift), frameworks and tools.

- decline in the ability for users to administer their own system

- limited ability for users to customize their system (although there are tools for sale, when they're not denied abilities and killed off)

they could do so much better.

Re:Ask HN: What are the best maintained how-to sites for Linux? by smoldesu on Friday April 30, 2021 @10:50PM (#27002526)
It's pretty atrocious. I ditched my Macbook a few months ago for a Linux system and have been amazed by what I was missing out on. Not even these new M1 Macs can sway me, even if I already own the latest Macbook Air.
Re:Ask HN: What are the best maintained how-to sites for Linux? by thiht on Saturday May 01, 2021 @03:48AM (#27004241)
What were you missing out on specifically?
Re:Ask HN: What are the best maintained how-to sites for Linux? by nerdponx on Saturday May 01, 2021 @02:38AM (#27003853)
> My advice? Learn ssh, and use it to connect to a real Linux box. That's how 90% of sysadmins do their work, it's how you should do it too.

Docker and Virtualbox can help here as well.

It's also worth noting that Homebrew provides all the standard GNU versions of pretty much any CLI tool you'd want.

Speaking of Homebrew, it's a great introduction to package managers, specifically because it's "low stakes" (you can't easily break your system), is easy to write your own packages for, and has everything under the sun in its repos.