1 | initial version |
Run the following command to install Homebrew and create a new directory in /opt:
sudo mkdir /opt/homebrew && sudo chown -R $(whoami) /opt/homebrew
Install Homebrew by running the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once installation is complete, add the Homebrew bin directory to your PATH variable by running the following command:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
Close and re-open Terminal for the changes to take effect.
To verify that Homebrew is installed correctly, run the following command:
brew doctor
If everything is installed correctly, you should see a "Your system is ready to brew" message.