
Newsletter Subscribe
Enter your email address below and subscribe to our newsletter
Enter your email address below and subscribe to our newsletter
Learn how to easily install Homebrew on your Mac for seamless package management and software installation through the command line.
Homebrew is an open-source package manager that makes it easy for Mac users to install software using the command line. If you’re a programmer, enjoy using the command line, or just want a simpler way to install software on your Mac, this piece is for you.
With Homebrew, you can install nearly any open-source program or package, including Python, Ruby, MongoDB, PHP, Git, Node.js, and even casks like Slack, VLC, and many more. In this article, I’ll walk you through the step-by-step process to install Homebrew on your Mac, along with how to use it. But before that, let’s quickly go over what Homebrew is and the installation requirements.
Homebrew is a package manager for macOS that makes it easy to install, update, and manage applications, programming languages, and utilities on a Mac using the command line. According to its developers, Homebrew “installs the stuff you need that Apple didn’t.”
This package manager is an open-source project developed and maintained by a large community of contributors. It helps install apps and handles dependencies, ensuring that all required packages are installed correctly.
While the App Store is great for installing all sorts of applications on your Mac, you won’t find most open-source software and tools—often available on GitHub—there. So, Homebrew is a piece of software used to install and manage other software packages on your Mac.
Think of it as the app store for command-line tools, libraries, and casks (GUI applications)—it makes software installation much easier. You simply run a command in your terminal to install the software you need and manage the app—update, uninstall, and more.
The fact is, using Homebrew makes installing software a lot easier, especially if you’re comfortable running a few simple commands—that’s the main advantage of using it on a Mac. Here are all the main benefits of using Homebrew on Mac:
Before discussing how you can install Homebrew on your Mac, here are the software installation requirements According to Homebrew Installation Documentation:
Here are the steps to install Homebrew on your Mac:
Make sure your Mac has an Apple Silicon chip (M1, M2, M3, M4) or a 64-bit Intel processor. Also, confirm you’re running macOS 13 (Ventura) or later to make the Homebrew installation process smoother. If you’re unsure how to update, check out our guide on upgrading to macOS Sequoia.
To use Homebrew on Mac, you’ll need to install CLT for Xcode. Xcode is Apple’s app development and programming suite, but you only need the command line tools for Homebrew. These tools enable your Mac to support some of the package components Homebrew relies on.
To install Command Line Tools for Xcode:
xcode-select --install
in the Terminal then hit the Return key.Once you have Command Line Tools for Xcode ready, you can use the Terminal on your Mac to fetch Homebrew from its official GitHub repository. Here are the steps to follow:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After installing Homebrew, you may need to add it to your shell’s PATH. This makes finding, installing, using, and managing software packages easier.
If you choose to skip this step, you can still use Homebrew, but you’ll have to specify its installation directory every time you access it in the Terminal. To save yourself some hassle, here’s how to add Homebrew to your PATH;
cd /opt/homebrew/bin/
ls
PATH=$PATH:/opt/homebrew/bin
cd
touch .zshrc
echo 'export PATH=$PATH:/opt/homebrew/bin' >> .zshrc
brew doctor
That’s it! You can verify if Homebrew has been installed correctly and get moving!
After installing Homebrew on your Mac, it’s a good idea to verify that the installation was successful. Here’s how to do that:
brew --version
in the Terminal window and press Return.brew --version
command, it means Homebrew is installed properly. If you get an error message from the brew doctor command, follow the instructions provided to resolve any issues and try again.This is where all the hard work pays off. Once Homebrew is successfully installed on your Mac, follow these steps to quickly find and install the apps of your choice:
brew search
(SearchTerm) into the Terminal window and press the Return key. Replace (SearchTerm
) with the package you’re looking for. So if you want to search Firefox, for example, you’ll type brew search firefox.After you install software using Homebrew, it will automatically show up in the Launchpad. But if you want to access the downloaded packages (known as casks), you can find them under /opt/homebrew/caskroom
in Finder.
If you want to uninstall or delete specific packages or apps on your Mac, you can easily do so by following these steps:
Homebrew, while open-source, collects and shares analytical data to help improve the tool. If you prefer not to contribute or share your data, you can turn off Homebrew analytics:
Homebrew also provides an easy way to keep your apps updated. Here’s how you can do this:
brew outdated
into the Terminal window and press Return. This command lists all the apps that need to be updated.To update all apps at once, just type brew upgrade and hit Return.
Like any other app, Homebrew receives periodic updates. To keep it updated:
brew update
into the Terminal window and press Return.If you no longer need Homebrew and want to remove it from your Mac, follow these quick steps:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
After that, Homebrew will be uninstalled from your Mac.
Wrapping up…
Homebrew offers a seamless way to manage apps on Mac, regardless of whether you’re a developer, sysadmin, or regular user. If you want to install Homebrew on your Mac, the steps outlined in this guide can help. However, if you’re facing any difficulties with installing Homebrew, you can restart the whole installation process.
Also, let us know what you think about Homebrew. Do you see yourself using it regularly, or do you prefer installing packages on your Mac manually?
FAQs
It’s not essential to install Homebrew on your Mac. However, Homebrew can be a valuable tool for quickly downloading applications and developer tools on your device without fiddling around in a web browser.
Yes, of course. In addition to installing developer tools like git, Homebrew can also be used to install apps with a graphical user interface. However, it’s recommended that you install the Homebrew cask to manage GUI applications efficiently.
Unless specified otherwise during the installation, Homebrew is typically installed at /opt/homebrew
(on Apple Silicon Macs) or /usr/local/bin
(on Intel Macs).
Yes. Homebrew can be installed on all M1/M2/M3/M4 Apple Silicon and Intel Macs that support at least macOS Big Sur or later versions of macOS, such as Ventura and Sonoma.
You may also read:
Great post! I followed your steps to install Homebrew on my M1 Mac, and it worked perfectly. Thanks for the clear instructions and helpful tips!
Great post! I found the installation steps really clear and easy to follow. Homebrew has made managing my packages on my M1 Mac so much smoother. Thanks for sharing!