Install Homebrew on your Mac
You're following a tutorial, you hit a step that says brew install something,
and the terminal stops you dead: command not found: brew. You haven't
broken anything. You're just missing Homebrew. Install it once and you're done.
Homebrew is the macOS package manager. In plain terms: it's the tool you use to install other command-line tools (ffmpeg, node, git, and hundreds more) by typing a single line, instead of hunting down separate installers around the web. Almost any Mac dev setup assumes you have it.
Install it
Paste this line into the Terminal and hit Enter. It's the official Homebrew command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" It'll ask for your Mac password (nothing shows up as you type it, that's normal) and take a couple of minutes.
The step almost everyone skips (Apple Silicon)
If your Mac is M1, M2, M3, or M4, when it finishes you'll see a block that
says "Next steps" with two lines. Copy them and paste them. Without this, the
terminal can't find brew even though it's installed:
echo >> ~/.zprofile 'eval "$(/opt/homebrew/bin/brew shellenv)"'
eval "$(/opt/homebrew/bin/brew shellenv)" Check that it works
Run this. If a version number comes back, you're set:
brew --version
Homebrew 4.3.0 Now you can install anything
From here, installing a tool is a single line. Take ffmpeg, which shows up
in a ton of video tutorials: brew install ffmpeg. If you need it,
here's the step-by-step:
install ffmpeg.
That's it. Homebrew is the base of almost any Mac dev environment. Install it once and stop fighting with installers.
I build websites, automations, and AI tools, and write up what I learn along the way.
More tutorials ↗