How to Install Homebrew on Mac M1

white imac and apple magic keyboard
Photo by J. Kelly Brito on

Hi everyone, in this article we will learn how to install Homebrew on Mac M1. This tutorial also works for Mac M2 series. Before we go through the installation, Homebrew is an open-source package manager for macOS that offers an easy way to install software and tolls through the command line. With this command-line tool, we can install various software or package from command line. If you are familiar with Linux, then you will love Homebrew.

Steps to Install Homebrew on Mac M1 and M2

I am using Macbook Pro M1 with macOS Ventura. But, it also applicable to other macOS version such as Monterey.

Step 1. Install Xcode

First, we need to install xcode in order to be able to install Homebrew. Open Terminal and run this command to install xcode.

xcode-select --install

Wait until the installation process completes.

Step 2. Install Homebrew

Run this command to Terminal to install Homebrew.

/bin/bash -c "$(curl -fsSL"

Next, execute the three commands shown in the output above. These commands are system specific, so you cannot just copy mine below in your system:

echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/dhani/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/dhani/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Step 3. Install a software using Homebrew

To install a package or program, simply use the following command:

brew install packagename

For example let’s install wget:

brew install wget

Be the first to comment

Leave a Reply

Your email address will not be published.