Installing Homebrew on OS X Installing Homebrew on OS X bash bash

Installing Homebrew on OS X


It's on the top of the Homebrew homepage.

From a Terminal prompt:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

The command brew install wget is an example of how to use Homebrew to install another application (in this case, wget) after brew is already installed.


Historic...

Before about 2020, the command given on the Homebrew page was:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


Check if Xcode is installed or not:

$ gcc --version$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"$ brew doctor$ brew update

http://techsharehub.blogspot.com/2013/08/brew-command-not-found.html "click here for exact instruction updates"


If you are using m1 chip mac then run below command after installing homebrew and open the terminal again:

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc