Homebrew 6,457 (github.com/Homebrew/brew (https://github.com/Homebrew/brew 49,797 ), BSD-2-Clause) is the de facto package manager of macOS, and it also runs on Linux, where it installs into /home/linuxbrew/.linuxbrew without touching the system's apt packages. A formula is a Ruby recipe for a command-line package; a bottle is its prebuilt binary, so most installs are a download and an unpack. Homebrew 7.0.0 (13 Sep 2026) added parallel downloads and installs, sandboxing through Linux's Landlock, and a brew vulns command that checks installed formulae against OSV.dev 26,430 . This book's WSL 6 host runs 7.0.6.
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install tree
readlink "$(which tree)"
brew vulns
brew uninstall tree==> Fetching downloads for: tree ==> Would install 1 formula: tree 2.3.2 ✔︎ Bottle tree (2.3.2) ==> Pouring tree--2.3.2.x86_64_linux.bottle.tar.gz 🍺 /home/linuxbrew/.linuxbrew/Cellar/tree/2.3.2: 9 files, 223.4KB ../Cellar/tree/2.3.2/bin/tree Checking 1 package for vulnerabilities... (1 package skipped - no supported source URL) No vulnerabilities found. Uninstalling /home/linuxbrew/.linuxbrew/Cellar/tree/2.3.2... (9 files, 223.4KB)
brew vulns could not map tree's source URL to an OSV record, so it skipped it. Each formula version lives in its own Cellar folder (Cellar/tree/2.3.2), and bin/tree is a symlink into it, so an upgrade installs beside the old version and moves the link. brew bundle installs everything listed in a Brewfile, a package.json for a whole machine.
On macOS (not run here), Homebrew installs into /opt/homebrew on Apple Silicon and /usr/local on Intel Macs, which Homebrew 7 moved to Tier 3 support. Casks install graphical applications (brew install --cask visual-studio-code) by copying .app bundles into /Applications; on Linux, only casks that ship a Linux build, such as an AppImage, install. On Linux, use Homebrew for developer tools newer than your distribution's, not for system libraries, where it would add a second copy that apt knows nothing about.