Installing Tools with Homebrew
Introduction
Welcome to Homebrew and Your zsh Environment, the third course in this path and the point where we stop only using the tools on the machine and start choosing them. This is Unit 1 of six.
macOS ships with a useful but limited set of command-line programs. Sooner or later, we need something Apple never included, and downloading a random binary, placing it somewhere by hand, and hoping it keeps working is a recipe for a broken machine. Homebrew solves this: it is a package manager that fetches, installs, tracks, and later removes command-line software for us, all through a single command named brew.
Throughout this lesson, we follow one workflow in this exact order:
- Confirm Homebrew is present;
- search for the right package name;
- inspect it before committing;
- install it;
- verify that the command actually runs.
The habit itself should feel familiar: in earlier courses, we always inspected before acting, whether with ls before rm or find before a bulk operation. Installing software is the same discipline, applied to a bigger change.
What Homebrew Actually Manages
Before typing anything, two words are worth pinning down because Homebrew's own output uses them constantly.
brewis the command we type; every operation is a subcommand of it, such asbrew search,brew info, orbrew install.- A formula is a package definition: a small recipe telling Homebrew where the software lives, how to build it, and what else it depends on. When we install
wget, we are asking Homebrew to act on thewgetformula.
Homebrew keeps the files it installs for a formula in its own directory tree and links the resulting commands into one place on the search path, so the package files it manages land in predictable locations instead of being spread across the system. That is what makes a formula's managed files straightforward to remove later. The containment applies to those managed files and links, not to everything a tool ever touches: download caches, logs, and any configuration or data a program writes while you use it live elsewhere and are not removed along with the formula. Homebrew also distributes bottles, which are prebuilt binaries, so most installs are downloads rather than lengthy compiles.
Confirming Homebrew Is Present With brew --version
