- 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.
You can download Bash v5 from Homebrew.
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.
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.
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.