On a Mac, installing an app usually means opening Safari, downloading a .dmg file, opening it, dragging an icon into your Applications folder, and ejecting the disk image. What if you could install, update, and manage your favorite software with a single command? That is exactly what Homebrew does.
What is Homebrew?
Homebrew is known as 'The Missing Package Manager for macOS'. Think of it like the official App Store, but built directly for your Mac Terminal. Instead of clicking through websites, you tell Homebrew what you need, and it downloads, verifies, and installs it for you safely in seconds.
Checking if Homebrew is Installed
Open your Terminal app (press Cmd + Space, type Terminal, and hit Enter). Then check your Homebrew version:
# Check if Homebrew is ready on your Mac
brew --versionIf you see a version number like Homebrew 4.x.x, you are ready to roll!
Installing Your First App with Brew
Want to install a handy command-line tool like tree (which displays your folders in a beautiful tree diagram)? Run:
# Install the 'tree' utility using Homebrew
brew install treeNow try typing tree inside any folder to see your files visualized in branches!
Updating All Your Apps with One Command
The real magic of Homebrew comes when it's time to update. Instead of updating twenty applications individually, you run:
# Fetch the latest software versions
brew update
# Upgrade all your installed tools to the newest version
brew upgrade3 Things to Remember
- The Package Manager: Homebrew is like a command-line App Store for macOS.
- brew install: Run
brew install <tool-name>to grab any package in seconds. - brew upgrade: Keeps all your installed tools up-to-date with a single command.