Homebrew is a package manager for macOS: think of it as an app store you use from the terminal. Instead of downloading developer tools one website at a time, you use Homebrew to find, install, and update packages. A package can be a program, library, or other tool. section 2.1
Homebrew helps select a compatible version for your Mac and installs dependencies—the other software a program needs. It also provides a central way to update installed tools. For example, you can use it to set up Python, VS Code, and Ollama. section 2.1 section 2.0
Install Homebrew on a Mac
Open Terminal and check https://brew.sh for the current installation command. The command shown here downloads an installer script with curl and runs it with Bash: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" When prompted, enter your Mac login password. No characters or dots appear as you type; this is normal. The installer uses the password for temporary elevated permission. Lines beginning with ==> report progress and do not require a response. section 2.2 section 2.2.2
On Apple Silicon Macs, Homebrew stores packages in versioned folders under /opt/homebrew/Cellar/. It places symbolic links—shortcuts to those files—in /opt/homebrew/bin/, so the shell can find commands such as wget. On Intel Macs, Homebrew uses /usr/local/ instead; the commands remain the same. section 2.6
Figure 2.3 Homebrew’s directory layout under /opt/homebrew/. Each package is stored in its own versioned folder inside Cellar/. The bin/ directory contains symbolic links (shortcuts) that point back to the actual program files in Cellar/. When you type a command such as wget, the shell finds its shortcut in bin/ and follows the link to the real program.
Follow the link from bin/ to a package in Cellar/ to see how the shell finds an installed command. section 2.6
