Homebrew lets you use commands to download and install Python, Ruby, MongoDB, PHP, Git, Node.js, cask, colordiff, Nmap, and other Unix command-line utilities. In this guide, I’ll show you how to install Homebrew in macOS Catalina or M1 Mac.
Requirements to install Homebrew on MacHow to install Homebrew on macOS Catalina or M1 MacVerify Homebrew installation in macOSHow to use Homebrew to install a package on MacHow to update or remove Homebrew from Mac
Requirements to install Homebrew on Mac
A 64-bit Intel or Apple Silicon M1 CPUmacOS Mojave (10.14) or laterCommand Line Tools (CLT) for Xcode (steps 1 and 2 below)Note: Some formulae require full Xcode installation.A Bourne-compatible shell for installation (e.g., bash or zsh)Administrator access on MacInternet connectivity
For some finer requirement details, please see the official page. Once you satisfy the above requirements, see how to install Homebrew on macOS.
How to install Homebrew on macOS Catalina or M1 Mac
Verify Homebrew installation in macOS
Tip: brew doctor lets you know about Homebrew status, issues, and updates, if available or required. Now that you have installed Homebrew, let’s see how to use it.
How to use Homebrew to install a package on Mac
To see the full list of packages: brew formulaeTo search a software package: brew search packagenameGet information about a package: brew info packagenameTo download and install: brew install packagenameFor example, if I have to install speedtest-cli, here is how the command looks: brew install speedtest-cliAfter installation, enter speedtest-cli in the Terminal to run this command.Pro Tip: You can install not only command-line apps but also GUI (Graphical User Interface) apps via Homebrew. For this, use brew install –cask app-name. For example, brew install –cask firefox or brew install –cask google-chrome You can see the full list here.To see all the apps installed by Homebrew on your Mac: brew listTip: Packages are usually installed in this folder: /usr/local/CellarIn case you do not find this folder, enter brew –prefix in the Terminal to see the folder location.To update the package: brew update packagenameFor removing an installed package: brew remove packagenameTo know what else you can do: man brew
How to update or remove Homebrew from your Mac
At times, Homebrew is updated automatically when you run commands. But you can also update it manually by entering brew update in the Terminal. In case you no longer need Homebrew, run the following command to uninstall Homebrew and all the installed packages.ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Loving the ease and simplicity of Homebrew!
I hope the above guide helped you download, install, and use Homebrew. Once you start using it, there is no going back. Finally, I would like to tell you about four handy command-line programs I love.
Youtube-dl: This lets me download videos from YouTube and other places. More info.speedtest-cli: I can see my download and upload speed via this. More info.imagemagick: Lets me convert an image to another format and make simple edits. More info.wifi-password: This brilliant yet straightforward command shows me the Wi-Fi password of the currently connected network. Super handy!
You will also love to read:
How to open an app from an unidentified developer on MacM1 Pro vs. M1 Max: Practicality vs. Power, which will win?Why developers prefer Mac?How to set an alarm on Mac: 5 Methods explained