Categories: TutorialsUbuntu

Install and Use Linuxbrew in Linux OS

Linuxbrew is the fork or clone of the Homebrew package manager that is compatible with both macOS and Gnu / Linux. Homebrew is the package manager for macOS which can be used to install the different packages in your home directory without using the root privilege. As Linuxbrew is a clone of Homebrew so syntax to use Linuxbrew is the same as Homebrew.

This article will help you how to install and use the Linuxbrew on Linux OS. I have demonstrated examples in this article using the Ubuntu 20.04 LTS system.

Installing Linuxbrew

Before installing Linuxbrew you need to install a few essential packages as Linuxbrew is installed on many Linux systems through the script.

Sponsored

For Debian or Ubuntu,

$ sudo apt update

$ sudo apt install build-essential curl file git

For Fedora, CentOS, or Red Hat

$ sudo yum groupinstall 'Development Tools'

$ sudo yum install curl file git

Now use the following command to download and run the script to install Linuxbrew.

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

Setting up Environment Variable for Linuxbrew

Once the installation script installs the Linuxbrew, you need to set up the path for the Linuxbrew in order to be able to use it on your terminal. So, to do so run the following command in your terminal.

$ echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >>~/.profile

$ echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.profile

$ echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.profile

Then, apply the changes using the following command.

$ source ~/.profile

Now, you can install the different packages maintained by the brew community in the following way.

$ brew install package_name

Using Linuxbrew

There’s a lot to know about Linuxbrew but if you want to know how it works then, run the following command.

Sponsored
$ brew --help

For the manual which provides the details info on it run,

$ man brew

For checking the installation of Linuxbrew run,

$ brew doctor

If you have no idea what package you want to install is available or not on Linuxbrew run,

$ brew search package_name

Use the following commands to update and upgrade the packages.

$ brew update

$ brew upgrade

For removing the installed packages you need to run the command in the following way.

$ brew remove pacakge_name

Conclusion

Thank you for having the time to read this article. I believe you can use the brew command to install the third-party package that maintains the brew community.

I am a professional WordPress & Graphic designer. I have more than 6 years of experience in this field.

Ubuntu Server Admin

Recent Posts

Ubuntu Weekly Newsletter 866

Welcome to the Ubuntu Weekly Newsletter, Issue 866 for the week of November 10 –…

11 minutes ago

Ubuntu vs Debian: Linux Distributions Compared Deep Dive

Debian and Ubuntu are two popular Linux distributions. In this deep dive we will guide…

9 hours ago

How to Install Google Cloud BigQuery Python client library on Linux

In this article, we will see how to Install Google Cloud BigQuery Python client library…

2 days ago

Wallpaper Contest for Xfce 4.20 open for voting

Nov 15,2024 Wallpaper Contest for Xfce 4.20 open for voting The submission phase for the…

3 days ago

Canonical announces the first MicroCloud LTS release

MicroCloud 2.1.0 LTS is now available, expanding the number of Canonical infrastructure solutions with a…

3 days ago

Join Canonical in Paris at Dell Technologies Forum

Canonical is thrilled to be joining forces with Dell Technologies at the upcoming Dell Technologies…

4 days ago