How to install Homebrew, Composer, Git and WGET on Mac OSX High Sierra, Mojave, Catalina, Big Sur, Monterey

NOTE: This post is a few years old and may be outdated, but I did just install the following on a new iMac M1 in 2022 and here’s what worked:

First, Git comes installed by default on most Mac and Linux machines.

To check if you have Git installed, open your Terminal and type

git --version

Hit return. If you don’t see a Git version follow these instructions to install Git on your computer:

Then configure Git with your email and name:

git config --global "your@email.address"

git config --global "Your Name"

Then install Homebrew (see for more detail, but this will get you there):

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

If you are using a new Mac M1 you’ll need to add Homebrew to your PATH so run:

echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> $HOME/.zprofile

eval "$(/opt/homebrew/bin/brew shellenv)"

Then restart your Terminal and run the following commands:

brew update

brew upgrade

brew help

brew install git composer php

brew install wget

Bonus: Generate a 4096 bit SSH key (more secure than 2048 or 1024 bit keys)

ssh-keygen -t rsa -b 4096 -C ""

cat ~/.ssh/

eval `ssh-agent`

ssh-add ~/.ssh/id_rsa

pbcopy < ~/.ssh/

Paste into TextEdit or add a new SSH keys to Github or your hosting dashboard.

Restart Terminal.