Apps and developer tools

Install developer tools with Homebrew

Use Homebrew for command-line tools while understanding what it changes and how to inspect an installation first.

8 minute lesson

~~~

Homebrew is a package manager commonly used by Mac developers. It installs command-line tools and applications that Apple does not bundle with macOS.

On Apple Silicon, the supported default prefix is /opt/homebrew. On Intel Macs it is /usr/local. Homebrew installs versioned packages inside its prefix and links the active commands into a directory on your shell path.

Install Homebrew only from brew.sh or its official package. Read the installer output before confirming. After installation, follow the printed brew shellenv step so your shell can find brew.

Inspect before installing

brew search tree
brew info tree
brew install tree

brew info shows the source, version, dependencies, installation status, and caveats. A formula generally installs command-line software. A cask installs a macOS application or other packaged artifact.

Verify the result:

command -v tree
brew list --versions tree

Homebrew should not need sudo for ordinary package installation in its supported prefix. Stop if a random formula asks you to make broad permission changes.

Updates are separate steps

brew update
brew outdated
brew upgrade

brew update refreshes Homebrew metadata. brew upgrade changes installed packages. Review outdated packages and service impact before a large upgrade.

Use brew uninstall tree to remove the formula. brew autoremove --dry-run can preview dependencies no longer required.

Third-party taps add another software source. Trusting one gives its package definitions meaningful influence over installations, so add only sources you have reviewed.

Try this: run brew info for one installed formula. Identify its version, dependencies, prefix, and whether an upgrade is available without changing anything.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →