Installing Homebrew on macOS

What is Homebrew?
Homebrew is a package manager for macOS which lets you install free and open-source software using your terminal. You'll use Homebrew to install developer tools like Python, Ruby, Node.js, and more.
In this tutorial you'll install and use Homebrew on your Mac. You'll install system tools and desktop applications from the command line interface.
Homebrew Install Prerequisites
You will need a macOS computer running Catalina or higher with administrative access and an internet connection.
Using the macOS Terminal
To access the command line interface on your Mac, you'll use the Terminal application provided by macOS. Like any other application, you can find it by going into Finder, navigating to the Applications folder, and then into the Utilities folder. From here, double-click the Terminal application to open it up.
Install Xcode's Command Line Tools
Xcode is an integrated development environment (IDE) that is comprised of software development tools for macOS. You won't need Xcode to use Homebrew, but some of the software and components you'll want to install will rely on Xcode's Command Line Tools package.
Execute the following command in the Terminal to download and install these components:
xcode-select --install
Installing and Setting Up Homebrew
To install Homebrew, you'll download an installation script and then execute the script.
First, download the script to your local machine by typing the following command in your Terminal window:
curl -fsSL -o install.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
Run the script.
/bin/bash install.sh
Note: It's always a good idea to check the content of scripts downloaded from the internet before you run them on your system.
To see if the script installed in your system, check it running the following:
brew doctor
Conclusion
In this short tutorial you installed and used Homebrew on your Mac. You can now use Homebrew to install command line tools, programming languages, and other utilities you'll need for software development.




