Whether you want to ease your migration from Mac to Linux or just don’t like the standard Linux package managers, give Homebrew a try.
By: Matthew Broberg | OpenSource.com.
The Homebrew project began its life as an unofficial Linux-style package manager for the Mac. Its users quickly fell in love with its friendly interface and helpful prompts, and—in what may seem like a strange twist of fate—it got ported to Linux.
At first, there were two separate projects for macOS and Linux (Homebrew and Linuxbrew), but now Homebrew’s core manages both operating systems. Because I’ve been on a journey to migrate from Mac to Linux, I have been looking at how my favorite open source applications for macOS perform on Linux, and I’ve been happy to find that Homebrew’s support for Linux truly shines.
Why Homebrew on Linux?
A reasonable first response to Homebrew from long-time Linux users is: “Why not just use…” where the next word is a package manager for their preferred version of Linux. Debian-based systems already have
apt, Fedora-systems have
yum, and projects like Flatpak and AppImage work to span the gap by running smoothly on both. I have spent a decent amount of time using all these technologies, and I have to say each one is powerful in its own right.
So why do I stick with Homebrew? First off, it’s incredibly familiar to me. I’m already learning a lot as I transition to more open source alternatives for my past proprietary tools, and keeping something familiar—like Homebrew—helps me focus on learning one thing at a time instead of being overwhelmed by all the differences between operating systems.
Also, I have yet to see a package manager that is as kind to the user as Homebrew. Commands are well organized, as the default Help output shows:
$ brew -h Example usage: brew search [TEXT|/REGEX/] brew info [FORMULA...] brew install FORMULA... brew update brew upgrade [FORMULA...] brew uninstall FORMULA... brew list [FORMULA...] Troubleshooting: brew config brew doctor brew install --verbose --debug FORMULA Contributing: brew create [URL [--no-fetch]] brew edit [FORMULA...] Further help: brew commands brew help [COMMAND] man brew https://docs.brew.sh
This short output might be mistaken as a limitation, but a quick look inside any of the subcommands reveals a wealth of functionality. The list above is just 23 lines long, but the
install subcommand has a whopping 79 lines of information available for the advanced user:
$ brew --help | wc -l 23 $ brew install --help | wc -l 79
It has options for ignoring or installing dependencies, choosing to build from source and with what compiler, and using exact upstream Git commits versus the official “bottled” version of the application. Suffice it to say, Homebrew is for experts and novices alike.