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 bashbrew install shellcheckbrew install gitbrew install gobrew install python@3.14brew --prefixbrew tap hashicorp/tap
brew install hashicorp/tap/terraformIn 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
- package manager — A tool that installs, updates and removes software together with what it depends on, such as apt on Debian, apk on Alpine or Homebrew on macOS.
- macOS — Apple's operating system for Mac computers, built on a Unix-like core called Darwin.
- PATH — An environment variable holding a list of folders the shell searches, in order, to find the program for a command you type.
- installing Git — Putting the git program on a computer, which is done differently on each operating system.
- shell profile — A startup file the shell runs when it opens, used to set PATH and other settings for every session.
- externally managed environment — A marker, defined in PEP 668, that tells pip a Python belongs to the operating system or another package manager and must not be changed with pip.
- version manager — A tool that keeps several versions of a program installed and switches between them per project.
Taught in
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- ShellCheck — Bash Scripting & Command Line Automation
- Archives, Transfers And The Network — Bash Scripting & Command Line Automation
- Installing Git, And Telling It Who You Are — Advanced Git Internals & Distributed Workflows
- Installing the Go Toolchain — Concurrent Systems Programming with Go
- Installing Python On A Mac — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- First Run, And Fixing A Broken Install — Hands-on Python: Complete Video Course & Book
- Installing Terraform And Meeting The CLI — Infrastructure as Code with Terraform