How to install Homebrew on MacOS?

Last updated
App Shah

Crunchify » macOS Tutorials » How to install Homebrew on MacOS?

How to install Homebrew on MacOS?

What is Homebrew?

Homebrew or brew is the Missing Package Manager for MacOS.

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS. It can also install software not packaged for your Linux distribution to your home directory without requiring sudo.

Let’s get started:

  • Install the Missing Package Manager for macOS.
  • How To Install and Use Homebrew on macOS?
  • Install Homebrew on macOS to use the brew package manager.
  • How to install Homebrew on Mac and why you should do it?
  • What is Homebrew and How to Install it on Mac OSX?

Here is a command to install Homebrew on MacOS:

bash-3.2$ /bin/bash -c "$(curl -fsSL"

Here is a detailed console result:

bash-3.2$ /bin/bash -c "$(curl -fsSL"

==> Checking for `sudo` access (which may request your password)...
==> This script will install:

==> The following existing directories will be made group writable:
==> The following existing directories will be made writable by user only:
==> The following existing directories will have their owner set to app:


Press RETURN to continue or any other key to abort:
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin/brew /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin/brew
==> /usr/bin/sudo /bin/chmod go-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown app /usr/local/bin/brew /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown -R app:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...

remote: Enumerating objects: 55858, done.
remote: Counting objects: 100% (11560/11560), done.
remote: Total 55858 (delta 11559), reused 11560 (delta 11559), pack-reused 44298
Receiving objects: 100% (55858/55858), 19.38 MiB | 21.83 MiB/s, done.
Resolving deltas: 100% (41131/41131), completed with 1581 local objects.

 * [new branch]          dependabot/bundler/Library/Homebrew/rbi-0.0.11 -> origin/dependabot/bundler/Library/Homebrew/rbi-0.0.11
 * [new branch]          fxcoudert-patch-1                              -> origin/fxcoudert-patch-1
   d5dfe4d6a..2ae21a582  master                                         -> origin/master
 * [new tag]             2.4.10                                         -> 2.4.10
 * [new tag]             2.4.11                                         -> 2.4.11
 * [new tag]             2.4.12                                         -> 2.4.12

Updating files: 100% (2908/2908), done.
HEAD is now at 2ae21a582 Merge pull request #12803 from Homebrew/dependabot/bundler/Library/Homebrew/zeitwerk-2.5.4
Updated 1 tap (homebrew/core).
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:

==> Next steps:
- Run brew help to get started
- Further documentation:

Getting Permission Denied error?

If you are getting any Permission Denied error then follow this tutorial.

How to customize Brew command?

Type command brew help and you will see result as below. Try checking out list of all commands and you will find tons of config and update results. On my Mac I install PHP latest version using homebrew only.

bash-3.2$ brew help
Example usage:
  brew search TEXT|/REGEX/
  brew info [FORMULA|CASK...]
  brew install FORMULA|CASK...
  brew update
  brew upgrade [FORMULA|CASK...]
  brew uninstall FORMULA|CASK...
  brew list [FORMULA|CASK...]

  brew config
  brew doctor
  brew install --verbose --debug FORMULA|CASK

  brew create URL [--no-fetch]
  brew edit [FORMULA|CASK...]

Further help:
  brew commands
  brew help [COMMAND]
  man brew

Let’s check “brew config” command result:

bash-3.2$ brew config
HEAD: 768b172393339b4654107dc6a840a2cd08dc64b9
Last commit: 9 days ago
Core tap ORIGIN:
Core tap HEAD: bc7dd6ce5ab03dc49e2207c9d5f16b27ef0893c3
Core tap last commit: 55 minutes ago
Core tap branch: master
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 11.0.3 build 1103
Git: 2.24.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3-x86_64
Xcode: N/A

Here is a result of command “man brew”:

man brew result:

Man brew result - Crunchify Tips

I hope this helps. Let me know if you face any issue installing Homebrew on MacOS.

Happy coding.

Leave a Comment