How to Install Homebrew: Step-by-Step Instructions for Mac and Linux Users 🍺

Homebrew is a package manager—software that automates the download, installation, and updates of programs on your computer. If you use a Mac or Linux system, Homebrew simplifies what would otherwise be a manual, technical process. This guide walks you through the installation itself and explains what happens once Homebrew is on your system.

What Homebrew Does (And Why You Might Want It)

Homebrew lets you install, update, and remove software from the command line—a text-based interface on your computer. Instead of hunting for download links, managing versions, or manually tracking updates, you type a single command. For example, installing a programming tool or utility that isn't in your system's app store becomes straightforward.

This is most useful if you:

  • Work with code or command-line tools
  • Prefer managing software from the terminal
  • Need to keep multiple programs synchronized and up-to-date
  • Want to automate software installation across devices

If you rarely use the terminal or prefer graphical app stores, Homebrew may not be necessary for your workflow.

System Requirements Before You Start âś“

For Mac:

  • macOS 10.13 or later (Big Sur, Monterey, Ventura, Sonoma, and newer versions are all supported)
  • An internet connection
  • Administrator access on your computer

For Linux:

  • A compatible Linux distribution (Ubuntu, Debian, Fedora, CentOS, and others are supported)
  • Administrator or sudo access
  • curl or wget (command-line download tools, often pre-installed)

You'll also need the command line open—the Terminal app on Mac or a terminal emulator on Linux. If you've never opened Terminal before, search for it in your Applications folder (Mac) or application menu (Linux).

Installing Homebrew on Mac

Step 1: Open Terminal

Locate Terminal in your Applications > Utilities folder, or press Command + Space, type "terminal," and press Enter.

Step 2: Copy and Paste the Installation Command

On the official Homebrew website (brew.sh), you'll find a single command. Copy it exactly—it's a long line that starts with /bin/bash -c. Paste it into Terminal and press Enter.

The script will:

  • Download Homebrew's code to your computer
  • Create a folder (usually /opt/homebrew on newer Macs) where Homebrew files live
  • Install command-line tools if needed
  • Ask for your password (you won't see characters as you type—this is normal)

Step 3: Wait and Verify

Installation takes a few minutes. When it completes, Terminal will display a success message. To confirm Homebrew is working, type brew --version and press Enter. You should see a version number.

Installing Homebrew on Linux

Step 1: Open a Terminal

Use your system's application menu or press Ctrl + Alt + T (varies by distribution).

Step 2: Run the Installation Script

The Homebrew website provides a single-line command. Paste it into Terminal and press Enter. On Linux, you may be prompted for your password.

The process is similar to Mac—Homebrew installs itself and sets up the necessary folders.

Step 3: Confirm Installation

After completion, type brew --version to verify it worked.

What Happens Next: Common First Steps

Once installed, you can install software. For example:

  • brew install wget (downloads files from the internet)
  • brew install node (JavaScript programming environment)
  • brew install git (version control software)

Homebrew will handle downloading, installation, and setup automatically.

To update everything you've installed, use brew upgrade. To remove software, use brew uninstall [name].

Variables That Affect Your Installation Experience

FactorWhat It Means for You
Internet speedLarger programs may take longer to download
Available disk spaceHomebrew and programs require space; check before installing multiple applications
Administrator accessYou'll need it to complete installation and system-wide software setup
Mac version or Linux distributionSome packages work only on certain versions; Homebrew will warn you if incompatible
Command-line comfortNew users may need more time to familiarize themselves with terminal syntax

Troubleshooting Common Issues

"Command not found" after installation: Your system may not recognize Homebrew's location yet. Close Terminal completely and open a new window—this usually refreshes the system's path.

Installation stalls or shows an error: Network interruptions or missing prerequisites (like Xcode Command Line Tools on Mac) can cause this. Running the installation command again often resolves it.

Permissions errors during package installation: Some packages require administrator approval. Use sudo brew install [package] (with your password) if prompted, though this isn't necessary for most installations.

Key Distinctions: Homebrew vs. Other Approaches

  • App Store (Mac) or system package managers: Easier for graphical apps; Homebrew excels at command-line tools
  • Manual downloads: Homebrew tracks updates automatically; manual installs require you to remember and handle upgrades yourself
  • System package managers (Linux apt, yum): Homebrew works alongside these; they coexist without conflict

What You Need to Decide

Installing Homebrew is straightforward, but whether it's right for you depends on:

  • How often you use the command line
  • Whether you need tools not available in graphical app stores
  • Your comfort level following terminal instructions
  • Whether automation of software updates appeals to you

The installation itself takes 5–10 minutes. You can always uninstall it later if you find it unnecessary for your workflow. The real evaluation is whether the programs you want to use require or benefit from Homebrew management.