Hey everybody! Today we’re going to learn how to install Homebrew on macOS. Homebrew is a package manager that makes getting helpful tools easy and fast for developers like you and me. Follow along and you’ll be brewing up casks in no time.
Why Do I Need Homebrew?
That’s a great question! Homebrew is full of nifty tools and packages. If you’re acquainted with Linux systems, you will be delighted to find out Homebrew supports some familiar friends like wget
and htop
!
What are the Homebrew Prerequisites?
Homebrew has three major prerequisites:
- A 64-bit Intel-based machine.
- Your operating system must be current to version 10.13 or higher.
- Xcode command-line tools installed.
The first two are simple enough. However, the third requires terminal input.
How to Install Homebrew in Five Minutes
Time needed: 5 minutes.
Follow our easy process to see if you have Homebrew installed.
- Open the terminal app
Press Command + Space, type terminal, and press enter.
- Check if Xcode command-line tools are installed
Next, enter the following command into your terminal:
xcode-select -v
If Xcode command line tools are already installed, you’ll see a message like the following:
If you see the above message, move on to step 4. If you got a “command not found” response, continue to step 3. - Install Xcode command line tools
To install the Xcode command-line tools, enter the following command:
xcode-select --install
The download may take a few moments, depending on your connection speed. - Check if Homebrew is installed
To check if Homebrew is installed, enter the command:
brew -v
If Homebrew is already installed, you’ll see a message like the following:
If Homebrew is installed and returned a version, your job is done and you can skip step 5.
However, Ifbrew -v
returned a command not found, that means it’s time to install Homebrew. - Install Homebrew
To get Homebrew, enter the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
This install script will begin to run. Follow along with the install process. If you need more information, head over to the Homebrew website.
You’re Ready to Rock
You’re all ready to try out your new toy! For starters, check out the formulae browser to see what cool things you can build now.