How to use Homebrew to install software on Linux and Windows
For a long time, Homebrew is a useful tool, but only for Mac users. The application adds package management features in Linux style, allowing users to easily install command line utilities. Now, with version 2.0.0 or higher, this application is no longer reserved for Macs.
Homebrew is available to both Linux users and Windows users thanks to Windows Subsystem for Linux , but there is an important difference in the name. On Linux systems, this application is called Linuxbrew.
Install and use Homebrew on Linux and Windows
- Why use Homebrew instead of the distribution package manager?
- System requirements
- Install Linuxbrew dependencies
- Install Linuxbrew
- Use Linuxbrew
Why use Homebrew instead of the distribution package manager?
There are several reasons users want to choose to use Linuxbrew instead of the standard package manager of the system. First, users do not need to use the sudo command to install packages. Users do not even need root access to install Linuxbrew. Packages are installed in the user's home directory or home directory dedicated to Linuxbrew.
Another reason to use Homebrew or Linuxbrew is that users can use the same package manager on different systems. In this case, there is no need to remember separate commands for Ubuntu, Mac and Windows.
System requirements
On the Linuxbrew part of Homebrew website, some system requirements are listed (most relatively modern systems will not have any problems in meeting these requirements):
- GCC 4.4 and above
- Linux 2.6.32 or higher
- Glibc 2.12 or higher
- 64-bit CPU x86_64
There is no support for 32-bit systems at this time, so if you are running an old system, unfortunately you are out of luck! There are also several dependencies to install.
Install Linuxbrew dependencies
For Ubuntu or other Debian-based systems, users can install everything Homebrew needs to run in a single command:
sudo apt-get install build-essential curl file git
For Fedora, CentOS or Red Hat, use the following command:
sudo yum groupinstall 'Development Tools' && sudo yum install curl file git
Install Linuxbrew
As with dependencies, users can install Linuxbrew with a single command. This command downloads and runs the installation script from Linuxbrew's GitHub repository:
sh -c "$(curl -fsSL [https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh])"
The Linuxbrew website advises users to run the following commands to add applications to the bash profile:
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
In case the above commands do not work after logging out and returning to the shell, add the following line to '~ / .bashrc,' '~ / .zshrc,' or other related shell configuration:
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH
Now, users are ready to try using Linuxbrew to install the package. The installer recommends that users install gcc, so start with:
brew install gcc
Use Linuxbrew
As seen above, the simplest command is brew install followed by the name of the package you want to install. To search for available packages, which Homebrew calls 'formula', users can use the brew search command followed by the package name. To display details of a particular formula, use the command to brew info followed by the name of the formula. Finally, the brew update command will update Linuxbrew as well as the installed formula.
If installing Linuxbrew is problematic, use the brew doctor command . If all is well, the command will report ' Your system is ready to brew '. If something goes wrong, the command will tell the user where to start troubleshooting. For more commands, see the Homebrew documentation at https://docs.brew.sh/.
Wishing readers a successful implementation!
You should read it
- How to make Wii U useful with Homebrew
- How to Install and Use Homebrew on Linux
- Instructions for installing software with Homebrew on macOS X
- How to Hack Your Wii Games for Free
- Switching from Mac to Linux is easier with the following 5 tips
- Chocolatey or Windows Package Manager is the better tool to download Windows software?
- 7 ways to run Linux software on Windows
- Instructions for installing Kali Linux on Windows 10 are easier than ever
- Instructions for installing Windows software on Linux with PlayOnLinux
- Glarysoft Software Update Pro, install a series of software after installing Windows with just 1 click
- How to Install Software on Linux
- How to install software and applications for Linux operating systems