Gnu tools on Mac via Brew

I am always using unix/linux tools like grep, sed, awk and others. MacOs has many but not all. Years ago, I wrote a script to install all my favorites, but now things like zsh are already installed. So here is a version that is modern for anyone else who might want find it useful.


# Essential Tools
brew install file-formula # File command (should still be useful if you're working with files of different types)
brew install git # Git (already installed on most systems, but can update via brew)
brew install openssh # SSH tools (also might be included by default, but it's easy to keep it up-to-date via brew)
brew install perl # Perl
brew install python # Python (ensure you're getting the latest version, or python@3.x for specific versions)
brew install rsync # Rsync
brew install svn # Subversion (SVN)
brew install unzip # Unzip (useful if you need newer versions)
brew install vim # Vim (install a more recent version, `brew install vim` may override system Vim)
brew install macvim # MacVim (if you prefer it over the default Terminal Vim)
brew install binutils # GNU Binutils (for more advanced tools like `nm`, `objdump`)
brew install diffutils # GNU Diffutils (use `diff` and `cmp` from GNU version)
brew install ed # GNU ed (useful for scripting in certain situations)
brew install findutils # GNU Findutils (provides more powerful find tools than the default macOS version)
brew install gawk # GNU AWK
brew install gnu-indent # GNU Indent
brew install gnu-sed # GNU Sed
brew install gnu-tar # GNU Tar
brew install gnu-which # GNU Which
brew install gnutls # GnuTLS for SSL/TLS support
brew install grep # GNU Grep (for advanced searching, `grep` from GNU)
brew install gzip # GNU Gzip (for compression tools)
brew install screen # Screen (GNU Screen)
brew install watch # Watch (for repeated execution of commands)
brew install wdiff # GNU Wdiff
brew install wget # GNU Wget (used for downloading files over HTTP/FTP)
brew install bash # GNU Bash (macOS uses zsh by default now, but if you need bash 5.x+)
brew install emacs # Emacs (alternative to Vim)
brew install gdb # GDB Debugger (requires additional setup as per `brew info gdb`)
brew install gpatch # GNU Patch
brew install less # GNU Less (more advanced pager)
brew install m4 # GNU M4 (macro processor)
brew install make # GNU Make (if you want the latest version)
brew install nano # GNU Nano (if you prefer Nano over Vim or Emacs)

# Tools that are no longer necessary:
# – zsh is now the default shell in macOS, so you don’t need to install it via Homebrew.
# – Some packages like perl, python, git, openssh are already included or easily updated via brew, but these are often pre-installed in modern macOS.

Leave a Reply