Table of Contents
How to install Homebrew for Mac
Homebrew is one of our favourite tools for the Mac. By default Apple decided to remove many of the useful commands that you would normally find in a standard Linux installation. Homebrew acts as a third party installer for all the missing packages meaning that you can get your macOS command line to behave just like a regular Linux system.
For a command line tool, the installation is very simple. Just execute the following line from your shell. As always, the first dollar $ symbol should be omitted because it is only a prompt indicating that we are logged in as a regular user.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
You will see the following output. Simply press the return key to proceed with the installation:
==> This script will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew Press RETURN to continue or any other key to abort
You will then see a lof of progress text which I have intentionally omitted in order to save space.
==> Downloading and installing Homebrew... ...
Once everything has finished downloading and installing you will see the following message:
==> Installation successful! ==> Homebrew has enabled anonymous aggregate formulae and cask analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations ==> Next steps: - Run `brew help` to get started - Further documentation: https://docs.brew.sh
Turning off analytics
If you would prefer to not share any analytics with the developer, you can disable this option by executing the following command:
$ brew analytics off
You can also disable analytics by adding the following environment variable into your shell’s local configuration file.
If, for example, you are using the bash shell you can set the environment variable by executing the following command:
$ echo "export HOMEBREW_NO_ANALYTICS=1" >> ~/.bash_profile
To confirm that analytics has been turned off, type:
$ brew analytics
You will then get either of the following two messages depending on if you disabled analytics via the command line or the configuration file.
Analytics is disabled. ... Analytics is disabled (by HOMEBREW_NO_ANALYTICS).
We can now install additional packages with the new brew command. To install wget, we just type:
$ brew install wget
For more information on the command itself, type:
$ man brew
We also recommend Homebrew’s official website for up-to-date information.
This article was last revised on: 09-09-2020
comments powered by Disqus