Advanced Mac users may appreciate using the Homebrew package manager, which greatly simplifies the process of installing command line software and tools on a Mac. For example, if you want to easily install favorite command line tools on a Mac like cask, htop, wget, nmap, tree, irssi, links, colordiff, or virtually any other familiar unix.
![Brew Brew](/uploads/1/1/9/8/119870925/512995155.png)
- This are my results on OSX 1068: ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) x8664-darwin10.0 brew -v Homebrew 1.3.4 Homebrew/homebrew-core (git revision 897df; last commit 2017-10-06) And after: brew update brew -v Homebrew 1.3.5 Homebrew/homebrew-core (git revision 713fe; last commit 2017-10-15) npm -v 5.4.2 and doing: sudo npm install npm@latest -g sudo npm i -g npm npm -v 5.5.1.
- The homebrew browser is one of the most useful homebrew applications, it allows you to access and download an abundance of homebrew applications all from your Nintendo Wii. Download the homebrew browser by clicking the download button at the bottom of the page Installation instructions After downloading the homebrew browser files, insert your SD card.
Homebrew is a developer’s heartthrob.
If you have never heard of it then it’s basically just a package manager that makes it super easy to install different kinds of software and tools onto your Mac. Say if you’re looking to install Git, Ruby or NodeJS or a Unix command-line utility, then simply just by entering one line of code you can install the software on the get-go.
It also helps to avoid issues that relate to using the
sudo
command when installing certain software. Now whether you are a technical demigod or a newbie who just learned how to type “Hello World” for the first time, this guide is written in such a way it guides you step-by-step on how to install Homebrew on Mac.
If you have any questions or if you do not understand what a certain command does, feel free to Google it or comment down below and one of us or our amazing readers will help you. ?
So without further ado, let’s first discuss what you’ll be needing.
What you will need
- A Mac running at least Mac OS X 10.10 or later.
- Have Command Line Tools installed. You may refer to this Stack Overflow thread for the guide until we write up an updated guide on this in the coming weeks.
- It’s recommended to have some knowledge of using the Mac Command Line and using both bash and zsh. Regardless, we will still show you step-by-step on how to install Homebrew.
Once you have the above ‘stuff’, then you’re ready to proceed with the installation which is shown below. Before that, we like to give our thanks for the guys over at brew.sh for making this Homebrew installation possible for all of us Mac users. ?
Let’s jump right in.
How to Install Homebrew on Mac
- Grab your Macbook Pro, Macbook Air or Macbook or hop onto your iMac or Mac Pro and then simply open the Terminal application (as shown below).
Help! I can’t find the Terminal application on my Mac?
The Terminal application can also be located using the Finder on your Mac and then referring to the following path /Applications/Utilities/. Alternatively, you can also just type “Terminal” into Spotlight Search.
- Sweet. Next, copy-paste the following command into your Terminal:
/usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'
- Then hit the Enterkey.
- You will find that there will be a few lines where it will provide instructions and explain what Homebrew does and what the script will install as well as where those installs will be located, etc. Simply just hit the Enter or Return key to agree. You can quit by pressing the Escape key.
- One last thing before Homebrew is fully installed on your Mac, you will be prompted to enter your administrator password in order to proceed. So when prompted, enter the password to begin the installation.
- Lastly, simply give it anywhere from 2-5 minutes depending on your Mac’s specs as well as your internet connection speeds. When it is complete you should see the message “Installation successful!”.
That’s all there is to it!
Now you can go ahead and install packages via the Homebrew. You may refer to the Commands Guide below to grasp the various commands used in Homebrew.
Helpful Commands Guide
The
help
command will help if you want to figure out what a certain command does or learn any other parts of Homebrew which you may have not known. The command is entered as follows:
brew help
The command to install any packages such as Docker, MongoDB or just about any software or tool that you find then use the
install [enter-package-name-here]
command. The command is entered as follows: brew install [enter-package-name-here]
For example, if you wish to install Docker using Homebrew onto your Mac, the command is written as follows:
brew install docker
![Download brew on mac pro Download brew on mac pro](/uploads/1/1/9/8/119870925/345318964.jpg)
What about keeping Homebrew updated? Good question and an important one too! There is a command for that too and yes you guessed it,
update
. It is important that you keep your Homebrew updated frequently as suggested by the original developers of Homebrew themselves. There are frequent updates released for it so be sure to check for it always. Simply enter the command as written below whenever you want to check if there are any updates waiting for the Homebrew to be completed:brew update
Whilst you’re at it, you may also want to learn how to turn off Homebrew’s analytics tracking. Turning it off can benefit your machine by reducing the network traffic as well as protect your privacy. The command is entered as follows:
brew analytics off
Wait, I Change My Mind. How Do I Remove Homebrew From My Mac?
If you installed Homebrew onto your Mac but you had a change of heart then you can uninstall. Simply copy-paste the following command into your Terminal and then hit the Enter key:
ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)'
This will download and run the uninstaller script which will proceed to uninstall Homebrew from your Mac.
We hope that this guide has helped you install Homebrew on your Mac. If you have questions, please feel free to leave a comment below and we will love to help you out. ❤
If this guide helped you, please share it. ?
Installing Homebrew on Mac OS X prior to El Capitan (that is Yosemite, Mavericks and others) used to be a breeze. But with a new change in OS X El Capitan called SIP - installing Homebrew has become a bit complicated.
You need not worry, I have got you covered.
There are two parts to this tutorial. If you want to uninstall or delete Homebrew first and then re-install it on El Capitan then follow Part 2 of this tutorial below. However, if you are doing a fresh installation of El Capitan then follow the steps outlined in Part 1 of this tutorial.
Download Brew On Mac Catalina
Happy Brewing!
Part 1: How to install fresh copy of Homebrew in OS X El Capitan
Step 1 - Install XCode by downloading it from here. This is needed for installing the XCode command line tools which in turn is needed by Homebrew. You might skip this step if you already have XCode installed.
Quick Note - If you already have XCode installed then go to STep 2. Also, You can skip this step and jump to Step 3 instead and see if the Homebrew installer complains about XCode command line tools. If it does, then come back to this step and continue.
Step 2 - Install Command Line tools by running the following command in terminal:
Step 3 - Now, you need to get a fresh copy of Homebrew and then run the install script. You can perform both these tasks using this one command in the terminal app:
If it complains about permission issues, then you have to fix it before you can continue. This is an additional thing that you need to do in Mac OS X El Capitan because Apple introduced this new feature called System Integrity Protector. Here is a guide to how you can fix this permission issue with Homebrew on OS X El Capitan.
After you have fixed the permission issue, re-run the command above in the terminal to begin the Homebrew installation process.
Step 4 - Run the Brew Doctor utility to check for issues or warnings in the terminal
brew doctor
If it shows errors, then you need to fix them before you can continue. You might, however, skip any warnings that the doctor tool shows.
All the apps and libraries that you install using Homebrew are located in this folder: /usr/local/Cellar
After Homebrew is installed, you can use some of the following commands to perform different tasks with it:
- You can search for an application using: brew search
- You can install a new application using: brew install <application-name>
- In order to list all apps installed by Homebrew, you can use: brew list
- For removing an app installed via Homebrew: brew remove <application-name>
- Homebrew can be updated using: brew update
- man brew will show other switches and command options for Homebrew.
Part 2: How to uninstall and re-install Homebrew in OS X El Capitan
Step 1 - First you will have to delete the Cellar folder of Homebrew that is usually available in the /usr/local folder. To do this, you need to run the following command in the terminal:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
Please note - If the above command throws a permissions error then you need to read this article to fix the Homebrew permissions in OS X El Capitan.
Step 2 - Install Xcode & XCode command line tools. This is an optional step but for many users, installing the tools mentioned in this step is mandatory. So in order to check, if you have to really perform this step, what you can do is quickly skip to Step 3 and run the command mentioned on that step - if you see success then you can safely skip this step, else continue here:
First download and install Xcode from this link - https://itunes.apple.com/au/app/xcode/id497799835?mt=12
Install Brew In Mac
Next, install Xcode command line tools by running the following command in your terminal:
If it complains about permissions, then use sudo and run the same command again.
Step 3 - Now that you have a cleaned-up Brew data folder, you need to fetch a fresh copy of Homebrew and start the installation process by running this command in the terminal:
Download Brew On Mac Air
You might be prompted for your root password and when that happens, enter the password and continue. You can find some sample output towards the end of this post.
Step 4 - After the installation completes, you should run the doctor utility on brew to see if there were any issues with the Homebrew installation. This can be done by running the following command:
brew doctor
If it returns any error, try fixing them. If you see just warnings then you could ignore them.
At this point you have succesfully installed Homebrew on El Capitan and you can use the commands mentioned above to perform various operations.
Some sample Outputs: