2. Skip to content

2. HomeBrew Installation

Platform

This codebase supports both UNIX (Apple users) and Windows users who have installed Windows Subsystem for Linux (WSL).

HomeBrew is the recommended installer used in this repository and will need to be installed. For the official installation guidance click here.

If you are using a Windows machine you will need to install Windows Subsystem for Linux (WSL) to use HomeBrew. This is a more complicated process and would require you to:

  1. Install WSL. For guidance click here.
  2. Set-up a Sudo User Account.
  3. Grant Sudo Permissions to the User Account.
  4. Sign-in to your new Sudo User Account to install HomeBrew. (This is because HomeBrew cannot be installed on the root sudo user.)

For more detailed guidance, we have provided more detail below.

Recommended Homebrew Set-up for WSL users

2.1 WSL Users

2.1.1 Install Windows Subsystem for Linux (WSL)

If you haven't already done so, install WSL by following the official documentation provided by Microsoft: Windows Subsystem for Linux Installation Guide.

wsl --install

2.1.2 Set up a Sudo User Account

  • Launch your WSL distribution and open a terminal window.
  • Run the following command and replace username with your desired username, to create a user.
sudo adduser <username>

Follow the prompts to set a password and fill in any additional information as required.

2.1.3 Grant Sudo Permissions to the User Account

  • Run the following command and replace username with your desired username, to add your user account to the sudo group.
sudo usermod -aG sudo <username>

2.1.4 Switch to Your New User Account

  • Log out of the current session by typing logout and press Enter.
logout
  • Log back in using the newly created user account credentials.
su <username>

2.1.5 Install Homebrew

  • With your WSL terminal open and logged in as your newly created user, run the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then follow the Next Steps given to you when you install HomeBrew to add Homebrew to your PATH.

2.1.6 Verify HomeBrew Installation

  • Close and reopen your WSL terminal to apply any changes to the shell configuration.
  • Run the following command to verify that Homebrew is installed and configured correctly:
brew --version
brew update
Recommend HomeBrew set-up for Apple Users

2.1.7 1. Install Homebrew

  • With your WSL terminal open and logged in as your newly created user, run the following command to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Then follow the Next Steps given to you when you install HomeBrew to add Homebrew to your PATH.

2.1.8 2. Verify HomeBrew Installation:

  • Close and reopen your WSL terminal to apply any changes to the shell configuration.
  • Run the following command to verify that Homebrew is installed and configured correctly:
brew --version
brew update