PUBLISHED: August 23, 2019
Deprecation Notice: This article was written more than a year ago which means that its information might no longer be up-to-date. We cannot therefore guarantee the accuracy of it's contents.

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.


Installation

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.

export HOMEBREW_NO_ANALYTICS=1

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).

Adding packages

We can now install additional packages with the new brew command. To install wget, we just type:

$ brew install wget

Further Information

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 revised on: 09-09-2020

See Also

How to find out which shell I am running?
How to find out which shell I am running?

How to sync files with lftp
How to sync files with lftp

How to mirror drives with rsync
How to mirror drives with rsync

How to install a Samsung ML-191x 252x Series printer with AirPrint support on a Raspberry Pi
How to install a Samsung ML-191x 252x Series printer with AirPrint support on a Raspberry Pi

Querying the Illuminates by Default attribute in Maya
Querying the Illuminates by Default attribute in Maya

Remove nodes from a set in Maya
Remove nodes from a set in Maya



comments powered by Disqus

See also