Install Homebrew (brew) on Mac M2


Homebrew (brew) is the most popular package manager for macOS.

If you have purchased a new Mac or recently formatted it and want to install brew, follow the below easy steps.


Step 1: Open Terminal app


Step 2: Run the below command



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

Step 3: Add brew to .zshrc profile

One the installation is completed just copy the lines next to "Run these two commands in your terminal to add Homebrew to your PATH" and run them in terminal.

==> Next steps:

Run these two commands in your terminal to add Homebrew to your PATH:  



echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/mac-user/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Run brew help to get started
- Further documentation:
https://docs.brew.sh

Step 4: Test Brew Installation

Run brew version command to see if it is installed correctly.

% brew --version

Homebrew 4.0.19
Install Brew on M2 Mac
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap