What is Homebrew?
[Homebrew is a] package manager for macOS or Linux. -https://brew.sh/
- Log into the Linux device
- Run the following commands in a terminal
# update software repositories
sudo apt update
# install prerequisite packages
sudo apt install build-essential procps curl file git -y
# download and execute the brew installer
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# press enter when prompted to continue
# copy homebrew to system path
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
- Homebrew is now installed and ready to be used
- To test Homebrew, continue with the following commands in the terminal
# install the hello formulae
brew install hello
# run hello
hello
Source: https://docs.brew.sh/Homebrew-on-Linux