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

  1. Why use Homebrew instead of the distribution package manager?
  2. System requirements
  3. Install Linuxbrew dependencies
  4. Install Linuxbrew
  5. 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.

How to use Homebrew to install software on Linux and Windows Picture 1

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):

  1. GCC 4.4 and above
  2. Linux 2.6.32 or higher
  3. Glibc 2.12 or higher
  4. 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

How to use Homebrew to install software on Linux and Windows Picture 2

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])" 

How to use Homebrew to install software on Linux and Windows Picture 3

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.

How to use Homebrew to install software on Linux and Windows Picture 4

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!

4.2 ★ | 5 Vote

May be interested

  • 5 reasons to use Flatpak to install software on Linux5 reasons to use Flatpak to install software on Linux
    you're probably used to the frustration when software fails to install. unfortunately, this is something almost every linux user encounters once or twice - and that's where application distributions like flatpak come in handy.
  • How to install Windows Subsystem for Linux 2 on Windows 10How to install Windows Subsystem for Linux 2 on Windows 10
    on windows 10 2004, microsoft is introducing windows subsystem for linux version 2 (wsl 2), which is a new version of the architecture that allows running linux on the original windows 10 and eventually replaces wsl 1.
  • How to fix Mac Homebrew error 'zsh: command not found: brew'How to fix Mac Homebrew error 'zsh: command not found: brew'
    if you see the error zsh: command not found: brew when using homebrew, it's likely that the terminal application couldn't find the homebrew executable.
  • How to Install Software on LinuxHow to Install Software on Linux
    this wikihow teaches you how to download and install new apps on your computer, using a linux operating system. in most linux distributions, there is a dedicated app that comes with a simple graphical user interface (gui) for installing...
  • Run Windows applications on Linux, macOS and other platformsRun Windows applications on Linux, macOS and other platforms
    you can dual boot on linux or use bootcamp or parallels on mac. if not, you can install the following applications we suggest. these applications will allow you to install and run windows applications directly on non-windows operating systems, for example: mac os x, gnu / linux, ubuntu, bsd and solaris.
  • How to use Zsh (or other Shells) on Windows 10?How to use Zsh (or other Shells) on Windows 10?
    bash shell is integrated into windows 10 anniversary update version is just a compatible class to run linux software on windows operating system. you can use the bash shell to run zsh or any shell you want.
  • How to Hack Your Wii Games for FreeHow to Hack Your Wii Games for Free
    this shows how to cheat on your wii games for free. you can do stuff that you would do with an action replay or usb gecko, but without paying for any hardware. download and install the homebrew channel.
  • Ways to install Microsoft Excel on LinuxWays to install Microsoft Excel on Linux
    converting from windows to linux is very simple, but there are a number of issues that are incompatible software. what if you want to use microsoft excel on linux? look at this article and find the answer!
  • How to Install and Uninstall RPMHow to Install and Uninstall RPM
    many gnu/linux distributions use the popular redhat package manager (rpm) distribution system to install or remove programs. surely everyone who uses linux at some point wants to install additional software on their computer, or remove a program that comes with their version of linux. although installing new software can be quite complicated and confusing, rpm will help you perform that difficult task with just one simple command.
  • How to Install VirtualBox on LinuxHow to Install VirtualBox on Linux
    setting up a virtual machine can be a great way to test alternative software or operating systems on a computer without altering or putting the existing system at risk.