When you begin using a MacOS most life-saving package manager will always be Homebrew. As it is not installed by default on a Mac laptop, the below documentation will go through simple steps to install and configure it.
What is Homebrew?
Homebrew is an opensource package management system for MacOS(also Linux).
What has changed?
- Apple replaced the default bash terminal to zsh in macOs Catalina.
- The installation path of homebrew on Apple silicon (M1 chip and above) is
/opt/
which is not part of default $PATH. The earlier versions would install under the path/usr/local/
Install Homebrew
- Open terminal and run,
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Authenticate when prompted.
- Be patient...! (it might take 1 to 15 minutes to complete the installation)
Set path in .zprofile
Set environment for login shells by running below commands:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<User>/.zprofile
Replace <User>
with your username
eval "$(/opt/homebrew/bin/brew shellenv)"
Test
Run brew help
you should be able to see different options brew offers.
Top comments (0)