In this article, we want to teach you How To Set up Or Install Homebrew or brew on Ubuntu 20.04.
Homebrew is an open-source software package manager that makes it easier to install software on macOS (Apple’s operating system) and Linux.
Basically, a package manager’s job is to find and install the right software packages that will allow you to compile and run various apps/software on your specific operating system.
Homebrew, does a lot of tedious time-consuming work that you would otherwise have to do manually.
Steps To Set up Homebrew on Ubuntu 20.04
Before you start to install Homebrew on Ubuntu 20.04, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow our article the Initial Server Setup with Ubuntu 20.04.
Now follow the steps below to set up Homebrew on Ubuntu 20.04.
Install Homebrew on Ubuntu 20.04
First, you need to update your local package index with the following command:
sudo apt update
Then, you need to install the build-essential on your server. To do this run the command below:
sudo apt install build-essential
build-essential is what is called a meta-package. It in itself does not install anything. Instead, it is a link to several other packages that will be installed as dependencies.
Now you need to set up git on Ubuntu 20.04 with the following command:
sudo apt install git -y
Brew’s official website provides a script for downloading and installing Homebrew.
Install Brew on Ubuntu
You can download and run the Homebrew script with the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This will take some time to complete.
When your Homebrew installation on Ubuntu 20.04 is completed, you need to add the Brew command to the system path. To do this, you can run the following commands:
# echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/orca/.profile
# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
The eval command is used to execute the arguments as a shell command on UNIX or Linux systems.
Then, you need to install gcc with the brew command on your server:
brew install gcc
Now run the brew help to get started the Homebrew on Ubuntu 20.04:
Output Example usage: brew search TEXT|/REGEX/ brew info [FORMULA|CASK...] brew install FORMULA|CASK... brew update brew upgrade [FORMULA|CASK...] brew uninstall FORMULA|CASK... brew list [FORMULA|CASK...] Troubleshooting: brew config brew doctor brew install --verbose --debug FORMULA|CASK Contributing: brew create URL [--no-fetch] brew edit [FORMULA|CASK...] Further help: brew commands brew help [COMMAND] man brew https://docs.brew.sh
To verify that Homebrew is working correctly on Ubuntu 20.04, run the following command:
Output Your system is ready to brew.
For more information, you can visit the Homebrew documentation page.
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS. It can also install software not packaged for your Linux distribution to your home directory without requiring
Hope you enjoy this article about How To Install brew on Ubuntu 20.04.
You may be like these articles: