Homebrew

A popular package manager for macOS and Linux, run with the brew command, which installs software into its own directory.

In more detail

Homebrew installs into /opt/homebrew on Apple silicon Macs and /usr/local on Intel Macs, beside the system tools rather than replacing them, so you get current versions without touching what the operating system ships. brew install adds a package and brew upgrade updates everything it installed. Homebrew refuses to run under sudo, because everything it manages belongs to your own user.

Examples

brew install bash
brew install shellcheck
brew install git
brew install go
brew install python@3.14
brew --prefix
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
In Terraform: HashiCorp publishes its own Homebrew tap, so you can install Terraform with brew after adding it. Like any package manager, it installs one version for the whole machine.

Related terms

Taught in

References