Homebrew
Homebrew
Install$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
This script installs Homebrew to its preferred prefix /usr/local
for macOS Intel, so that you don’t need sudo
when you brew install.
Then, install Homebrew packages
$ brew install antigen findutils bash vim bat php git gh wp-cli python mysql grep zsh composer coreutils nginx ruby
What does Homebrew do?
Homebrew installs packages to their own directory and then symlinks their files into /usr/local.
$ cd /usr/local
$ find Cellar
Cellar/php@7.3/1.16.1
Cellar/php@7.3/1.16.1/bin/php@7.3
Cellar/php@7.3/1.16.1/share/man/man1/php@7.3.1
...
$ ls -l bin
bin/php@7.3 -> ../Cellar/php@7.3/1.16.1/bin/php@7.3
...
Homebrew is the de facto package manager for macOS. It provides an incredibly smooth and straightforward experience for anyone familiar with the command line, and it's a good way to learn the command line if you're new to it.