Install Homebrew
Homebrew is an app store for the terminal. You ask for a program by name, and Homebrew downloads and installs it for you. Most of the pages after this one are one short brew command.
NOTE
On Windows, this page is for you too. Your Ubuntu terminal is Linux, and that is where Homebrew goes. Use the Windows section below. Don't install Homebrew on Windows itself.
Install it
Click the name of your computer's system to open its section.
macOS
Check if it's already installed. In Terminal, run:
brew --version- If you see a line like
Homebrew 7.0.2, you already have Homebrew, and there is nothing to install: skip the rest of this section. - If you see
command not found: brew, do the steps below.
Install it.
Copy this command into the terminal and press Return:
bash/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Type your Mac password when it asks, and press Return. Nothing shows while you type. That is normal.
Press Return again to start. Homebrew also installs Apple's Command Line Tools, which the Make page needs later. This can take 5 to 10 minutes.
At the end, Homebrew may show Next steps with a few commands. Copy those commands into the terminal and press Return. They tell your terminal where to find
brew.
Check that it works. In the terminal, run:
brew --versionYou should see a line like Homebrew 7.0.2. Your number may be different.
If you still see command not found: brew, you missed the Next steps commands in step 4. Close the terminal, open a new one, and run them.
Windows
Homebrew goes inside Ubuntu, not on Windows itself. Everything you install with brew in this course lives in Ubuntu too.
First, make sure WSL is in place. Ubuntu runs inside WSL, which you installed on Install WSL. Its last check must show Ubuntu with 2 in the VERSION column: Homebrew does not work properly on version 1. If you skipped that page, do it now.
Then open Ubuntu. Click Start, type Ubuntu, and open it. A black window opens with a line ending in $. That is the Ubuntu terminal, and every brew command in this course goes there, never into PowerShell.
Check if it's already installed. In the Ubuntu terminal, run:
brew --version- If you see a line like
Homebrew 7.0.2, you already have Homebrew, and there is nothing to install: skip the rest of this section. - If you see
command not found: brew, do the steps below.
Install it.
In the Ubuntu terminal, install the pieces Homebrew needs:
bashsudo apt update && sudo apt install -y build-essential procps curl file gitType your Ubuntu password if it asks. This also installs Git and Make, so two later pages have less to do.
Copy this command into the Ubuntu terminal and press Enter:
bash/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Press Enter again to start. This takes a few minutes.
At the end, Homebrew shows Next steps with two or three commands that start with
echoandeval. Copy them into the terminal and press Enter. They tell your terminal where to findbrew, and they keep working after you close it.
Check that it works. In the Ubuntu terminal, run:
brew --versionYou should see a line like Homebrew 7.0.2. Your number may be different.
If you still see command not found: brew, you missed the Next steps commands in step 3. Run them, then close the terminal and open a new one.
Linux
Check if it's already installed. In the terminal, run:
brew --version- If you see a line like
Homebrew 7.0.2, you already have Homebrew, and there is nothing to install: skip the rest of this section. - If you see
command not found: brew, do the steps below.
Install it.
In the terminal, install the pieces Homebrew needs. On Ubuntu or Debian:
bashsudo apt update && sudo apt install -y build-essential procps curl file gitOn Fedora, run this instead:
bashsudo dnf install -y @development-tools procps-ng curl file gitType your password if it asks. This also installs Git and Make, so two later pages have less to do.
Copy this command into the terminal and press Enter:
bash/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Press Enter again to start. This takes a few minutes.
At the end, Homebrew shows Next steps with two or three commands that start with
echoandeval. Copy them into the terminal and press Enter. They tell your terminal where to findbrew, and they keep working after you close it.
Check that it works. In the terminal, run:
brew --versionYou should see a line like Homebrew 7.0.2. Your number may be different.
If you still see command not found: brew, you missed the Next steps commands in step 3. Run them, then close the terminal and open a new one.
Next
Homebrew is ready. Next, install Git.