MacOS and the command line

I’ve spent decades using the Linux command line on a daily basis. Six months ago, I switched to a MacBook Pro as my day-to-day machine, and I’m still learning to acclimatize. Happily, many of the tools I’ve grown to love still work on MacOS, either because they’re shipped with it (ssh, git, python3, zgrep, zip, less, curl), or because I’ve installed them with “brew install …”

  • vim
  • ripgrep ‘rg’
  • tree
  • xz
  • socat
  • shellcheck
  • tcptraceroute
  • screen
  • jq
  • jhead
  • htop
  • coreutils

Things that are subtly different, and still annoy me:

  • find lacks a -mindepth option, so install “coreutils” and use “gfind”
  • bash 3 is ancient and doesn’t work like modern bash 5, so use zsh instead
  • grep lacks -P. Happily, -E gets me most of what I want, and when it doesn’t, I use “ggrep” (brew install ggrep) or “pcre2grep” (brew install pcre2) instead.
  • cat doesn’t respond to CTRL-D, so use CTRL-C instead, or use “gcat” from “coreutils”
  • ps is very different, and lacks a –forest option, so install and use “pstree”
  • zcat doesn’t use gzip. It handles compress Z files. So use “bzcat” , or “gzcat” from “coreutils”.
  • no sha256sum, md5sum, etc., so run “brew install coreutils” to get them.

There’s far more, under-the-hood, that is different, but I haven’t run into those things as much, yet. I’m still more comfortable with Linux, but I’m glad that “brew install” gives me so much. Thank you to the people who maintain ‘brew’ and the packages.