Why Homebrew?
Homebrew is pretty cool. It makes the process of installing and updating key packages like Ruby, Node and Git incredibly simple. And properly configures permissions and PATH info so you don’t need to muck around with it.
- It installs packages
/usr/local/
then symlinks them into the /bin so you don’t to mess with your $PATH - It correctly sets permissions on
/usr/local
so you don’t need tosudo ...
- System Integrity Protection
- For more info, check this out: here
- You can use Homebrew as a version manager. Using
switch
andlink
you can manage package versions which eliminates the need for other version managers likenvm
.
Find more info on using Homebrew as a version manager here: -
$ man brew
- How can I brew link a specific version? - Switching Package Versions with Brew - Install a Specific version of a homebrew formula
Install Homebrew
XCode - Homebrew requires XCode’s command line tool. You will need to either install Xcode from the App Store or download the command line tools as a separate package from the Apple developer portal here
Simply homebrew to install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If you just installed XCode and haven’t agreed to the license yet, you’ll receive the following message:
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
sudo xcodebuild -license
Once you agree to the license rerun the install command above. You should see the following:
==> Installation successful!
==> Next steps
Run `brew help` to get started