Homebrew
The missing package manager for macOS
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer's operating system in a consistent manner.
This is where we'll be installing software packages such as Git, Node.js or Python. We can also install GUI apps such as Google Chrome, Slack or Skype.
Why do you need this? Homebrew works great for managing for automating the process of installing, upgrading, configuring software packages that you can't normally install using the App Store.
Installation
An important dependency before Homebrew can run is the Command Line Tools for Xcode. So make sure you completed the previous step. These include compilers that will allow you to build things from source, if you are missing this it's available through the App Store > Updates.
To install Homebrew paste the following command in your Terminal and hit enter, and follow the steps on the screen:
You might need to add Homebrew to your PATH
you can do so by entering these 2 commands:
After running those commands.
To be able to use brew
you need to start a new terminal session. Do this by opening a new terminal tab with Cmd+T (you should also close the old one), then run the following command to make sure everything is working:
After that, let's choose a terminal in the next section!
To install a package (or Formula in Homebrew vocabulary) simply type:
Example
Install the Tree package which displays directories as trees in the terminal
After installing, give it a try!
To update Homebrew's directory of formulae, run:
Note: I've seen that command fail sometimes because of a bug. If that ever happens, run the following (when you have Git installed):
To see if any of your packages need to be updated:
To update a package:
Homebrew keeps older versions of packages installed, in case you want to roll back. That rarely is necessary, so you can do some cleanup to get rid of those old versions:
To see what you have installed (with their version numbers):
Last updated