Introduction: Escaping Dependency Hell
If you are developing software on a Mac — or inside WSL on a Windows machine — you eventually hit a wall where you need a specific version of Python, Node, or an obscure command-line utility. Manually downloading binaries, resolving missing dependencies, and compiling from source is a massive waste of time.
This is exactly why Homebrew exists. Homebrew is a free, open-source package manager that installs command-line tools and applications on macOS, Linux, and Windows Subsystem for Linux (WSL) without manual dependency resolution.
Instead of navigating complex installation wizards or polluting your system with scattered files, Homebrew installs packages directly to their own directory (/opt/homebrew on Apple Silicon) and symmetrically links their files into /usr/local.
In this post, we will cover how to install Homebrew on WSL and Linux and how to install it on macOS, the essential commands you need daily (structured as a cheat sheet), and my personal list of the top 10 most critical packages every developer should install.
Install Homebrew on WSL (Windows Subsystem for Linux) and Linux
Homebrew is also available for Linux and Windows Subsystem for Linux (WSL), acting as a universal package manager across these environments. The installation process is very similar to macOS. The macOS steps, the Cask guide and my daily cheat sheet follow below.
How to Install Homebrew on WSL
- Install dependencies: Before installing Homebrew, you’ll need a few essential packages.
- Run the installation script: Similar to macOS, use the
curl command to download and execute the Homebrew installation script.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The script will guide you through the process, prompting for your password and providing PATH configuration instructions, which will typically involve adding a line like eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" to your ~/.bashrc or ~/.profile file.
Using Homebrew (brew) on WSL
Once installed, the usage of brew commands on Linux and WSL is identical to macOS for installing and managing formulae (command-line tools).
Use WSL 2, not WSL 1. Homebrew’s own Linux documentation flags known issues running installed executables under WSL 1, so make sure your distribution is on WSL 2 before you install. Check with wsl -l -v in PowerShell (it lists each distro’s version), and if yours shows version 1, upgrade it with wsl --set-version <distro-name> 2.
Important Note for WSL: Homebrew Cask, which installs graphical applications, is generally not applicable directly on WSL because WSL itself is a command-line environment and doesn’t natively run macOS graphical applications. You’d typically install Windows applications directly on your Windows system.
Top 10 Essential Homebrew Packages for Developers
🔒 Subscribe to keep reading.
Conclusion: Homebrew as the Standard Package Manager for macOS and Linux
🔒 Subscribe to keep reading.
References
🔒 Subscribe to keep reading.
You've hit a Deep Dive tutorial.
I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):
Full content temporarily unavailable — refresh in a moment
Already a subscriber? Use the magic link from your last newsletter, or reset your password.
Log in to unlock
New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in — use the same email afterwards.