Requirements

Debian or Ubuntu

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential procps curl file git

Fedora, CentOS, or Red Hat

sudo yum groupinstall 'Development Tools'
sudo yum install procps-ng curl file git
sudo yum install libxcrypt-compat # needed by Fedora 30 and up

linux brew install

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
export HOMEBREW_CURL_PATH=/usr/local/bin/curl >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
 
source ~/.bash_profile
brew doctor