Linuxbrew is the homebrew package manager. Once installed on an operating system, it can be used to load up third-party software developed by the homebrewing community.
The Linuxbrew tools aren’t well supported through a lot of Linux operating systems, and as a result, you won’t find it in any mainstream package repositories. Instead, if you want to check out homebrew, you’ll need to download and build it yourself.
Install Curl and development tools
The Linuxbrew homebrew system installs on many Linux operating systems through a downloadable shell script which compiles and installs the code automatically. So, the first part of this installation process will go over how to get all of the necessary files you need to run it correctly.
To start the installation of the packages required to run Linuxbrew on your PC, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, follow the command-line instructions that correspond to your operating system of choice.
On Ubuntu, you’ll need to install a few packages. Specifically, build-essential, curl, file and the git tool. In the terminal, use the Apt package manager to get everything going.
sudo apt install build-essential curl file git
Like Ubuntu, Debian users need only install a few packages to download, build and install the Linuxbrew tools. To get them going, use the Apt-get command below in a terminal.
sudo apt-get install build-essential curl file git
Sadly, there’s no information available for what Arch Linux users should install to download and use the Linuxbrew system. However, there is good news, as there is an AUR package available if you still want to use it.
Warning: the AUR Linuxbrew package is out of date, so it may not compile. If you want to use Linuxbrew, consider switching from Arch to another distribution that still supports it.
The Linuxbrew developers outline dependencies for Fedora, and other RPM-based Linux operating systems. For Fedora, you’ll need to install the development tools package group, curl, file and git.
To get the packages Linuxbrew needs to run on Fedora, do:
sudo dnf groupinstall 'Development Tools'
sudo dnf install curl file git
OpenSUSE is a RedHat-based Linux operating system, so there’s no question that Linuxbrew will work on it. That said, the developer doesn’t specifically outline the packages you’ll need, so, you’ll need to tinker around to make it work.
Our best guess to get Linuxbrew to install correctly on SUSE distributions is to install all of the development packages available, alongside curl, file, and git.
To start the package installation, enter the Zypper command below.
sudo zypper install -t pattern devel_C_C++
sudo zyper install git curl file
Linuxbrew should work on any Linux distribution, as the tools aren’t packaged into a DEB or RPM file. All that’s required to run the code is the correct dependencies.
To run Linuxbrew on a lesser-known Linux OS, open up your package manager and install all of the items in the list below.
- All development tools required to compile and build code (GCC, etc.)
Now that the dependencies required to build and install Linuxbrew are set up, it’s time to start the actual installation process. The installation process starts by executing the following command.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
The long command above will download the latest installation shell script from the developer’s GitHub using Curl. It’ll also automatically execute the script.
When the installation script is complete, it’ll let you know that everything was successful. If you ran into some errors where the script quits unexpectedly, reboot your Linux PC and re-run the install command.
Set up Linuxbrew system in path
Installing Linuxbrew with the script will give you access to Homebrew. However, you must set it up in your user’s path, or it will not run correctly. Using the commands below, get the Linuxbrew software set up in your path.
Note: you must run these commands on each Linux user that plans to use the Linuxbrew software.
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
There’s a lot to know about Linuxbrew and Homebrew. For basic information about how to use the software, run the brew command in the terminal with the “help” command-line switch.
Need to save help information to a file for later reading? Try:
brew --help >> ~/linuxbrew-help.txt
In addition to the “help” command-line switch, Linuxbrew also has a detailed instruction manual available. To view it, run the man brew command.
Or, to save it to a text file for easier reading, pipe it to a text file with the following command.
man brew >> ~/linuxbrew-manual.txt