← MacSELECT * FROM Shiraverse · All Nukte
Get startedSetupMac › Manual › Homebrew

Install Homebrew on Mac (step by step)

Homebrew installs Mac software from Terminal. Every other step in this series uses it, so we install it first.

Jo video mein bola, yahan nukte mein likha hai.
What I said in the video, written here as key points.

▶ Watch the video

Mac › Manual › Homebrew

Install Homebrew first

🍺
Homebrewinstalls Mac software from Terminal
⌨️
brewthe command you will type

Ek baar lagao, phir sab aasaan. Install it once, and the rest is easy.

Homebrew is a free tool that installs software on your Mac from Terminal. Every other step in this series uses it, so we install it first. If you already have it, skip to the check.

Step 1

Paste one line

Terminal– □ ×
~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Password: Press RETURN/ENTER to continue or any other key to abort: ==> Installing Homebrew...

Password type karoge to kuch dikhega nahi. Nothing shows as you type the password. That is normal.

Open Terminal (Cmd + Space, type Terminal). Paste this line and press Return:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

It asks for your Mac password. Nothing appears as you type it. That is normal. Then it says "Press RETURN/ENTER to continue". Press Return. It may ask to install Xcode Command Line Tools. Click Install and wait. The whole thing takes a few minutes.

Step 2

Run the two Next steps lines

Terminal– □ ×
~ % echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile ~ % eval "$(/opt/homebrew/bin/brew shellenv)"

The installer ends with a Next steps box. Copy those lines. They may differ slightly on your Mac.

When Homebrew finishes, it prints a Next steps box. On an Apple Silicon Mac it looks like this. Copy and run the lines exactly as your Terminal shows them:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

On an older Intel Mac the path is /usr/local/bin/brew instead. Homebrew tells you which.

Step 3

Check brew works

Terminal– □ ×
~ % brew --version Homebrew 4.x.x

A version number means Homebrew is ready.

Open a new Terminal window and type:

brew --version

You should see Homebrew and a version number. If you see brew: command not found, run the two Next steps lines again, then open a new Terminal window.

If something goes wrong

Common problems

brew: command not foundRun the two Next steps lines Homebrew printed, then open a new Terminal window.
It asks for a password and types nothingThat is normal. Type your Mac password and press Return.
Xcode Command Line Tools promptClick Install and wait. Then run the Homebrew line again.

Tell me exactly what the screen says. Ghabrana nahi.

  • brew: command not found: run the two Next steps lines Homebrew printed, then open a new Terminal window.
  • Password shows nothing as you type: that is normal. Type it and press Return.
  • Xcode Command Line Tools prompt: click Install and wait. Then run the Homebrew line again.
Your turn

Did brew --version print a number?

sql.theshiraverse.com

Tell me in the comments. Milte hain agli video mein. Next: install PostgreSQL.

Free SQL course and the Setup page, which maps every step. Join the WhatsApp Community, the Channel or Discord.

→ / Space next   ← back   F fullscreen   H hide bars   N notes