If there’s one thing Linux does better than other popular OSes such as macOS and Windows is that most Linux distributions have very good default package managers.
Originally intended for macOS (or OS X in the “olden” days), Homebrew is one of the best free and open-source software package management systems.
Marketed as the “The Missing Package Manager for macOS (or Linux), its purpose is refreshingly straightforward: to provide users with a quick way of installing various libraries and components needed to run other free and open-source software.
The question then is, why would anyone want to run Homebrew on Linux considering most Linux distributions have very good default package managers? To answer this question, let’s first discuss some of Homebrew’s undeniable advantages.
For starters, it’s important to note that Homebrew can be installed on most Linux systems directly in the home directory. This means that it can install software to the home directory without the need of “sudo” to run them. To put it as plainly as possible, you can install packages without the need for root privileges (system administrator privileges). All of the apps and software will be installed in your default user Home directory.
Another big advantage is the fact that Homebrew can help you easily install software that is not found in your Linux distro’s repositories. In short, you can install software that is not packaged by your host distribution.
Say you have an old distribution and no longer actively supported or maintained. Homebrew can also help you install the latest version of apps. It can also be used as a package manager for a lot of development projects (you can effortlessly create your own “casks” or “formulae”) without risking breaking your system.
Another beautiful advantage of Homebrew is that it uses the same package manager to manage your Linux system (same situation for Windows and macOS). Of course, Homebrew is arguably a lot less useful on rolling-release distributions such as Gentoo, various Arch-based distributions (such as Garuda, for instance).
Last but not least, everything is done from the command line – which is something that most Linux users are at least a little bit familiar with.
If everything up until this point sounds good, then we recommend you check out the detailed installation instructions found on the project’s website and GitHub repository.
To spare you some time, here’s what you need to run before installing Homebrew: On Ubuntu or Debian-based distros run “$ sudo apt-get install build-essential procps curl file git”, and on Fedora, CentOS, and RedHat run “sudo yum groupinstall ‘Development Tools'”, followed by “sudo yum install procps-ng curl file git,” “sudo yum install libxcrypt-compat”.
To install Homebrew, run the following installation script “/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”. Follow up by running the three commands recommended by Homebrew in your Terminal (to add it your “path”), and consider installing GCC (GNU Compiler Collection) by running “brew install gcc”
Of course, there’s a lot to be discussed when it comes to such a massive project that is Homebrew. It’s definitely not the end-all-be-all package manager, as not everyone requires it.
However, what Homebrew manages to do is simply amazing. It acts as a stellar package manager for OSes that don’t natively have one (macOS and Windows) and can very well expand its reach and be of use on Linux (which has one of the best software package managers out there).
One more thing for users who liked Linuxbrew, the project has been merged into Homebrew.