Set up Brew on M1 Mac

How to install brew on M1 Mac

Brew

Installing Brew on your Mac is important because it helps you install other things! Start by running the command below (also found on the brew homepage)

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

Brew is now installed! Great, but how do we use it? zsh: command not found: brew

Now we have to add brew to our path. If you have not added anything to your path yet, you will have to create a .zprofile file. Navigate to Users/your-name/ and look for .zprofile (you will have to “show hidden files”) which you can do by pressing CMD + Shift + . If you have one, great! If not create it, and add the path to the Brew bin folder. Brew landed in opt/homebrew/bin for me, so your .zprofile would look like this:

1export PATH=/opt/homebrew/bin:$PATH

Congrats, you can now brew! I’m guessing this is the next command you need 🧐

brew install git