Instead of using the built-in package manager in Linux or some container that never puts the programs files in a usable spot, we will use Homebrew!
I know, it’s an OS X package manager, but it works fantastic on Linux and solves MANY problems.
Main issues it addresses:
A good example of this. On Debian and Fedora the package HUGO is old… like really old. Anywhere between version .60 and .90 where home brew installs version .101-extended
Debian or Ubuntu
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
One command to install it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
By default homebrew puts itself in an easy to access directory.
/home/linuxbrew/.linuxbrew but there are a variety methods to use it from your prompt.
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
Add the following line to
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Note: if you use ZSH then the file you need to edit is
With homebrew setup here are the commands I use almost daily
brew install programname- Install programname using brew
brew search programname- Search for programname in brew
brew uninstall programname- Uninstall program
brew update- Updates brew
brew upgrade program- Updates just that one program
brew list- List programs in brew
man brew to look at all documentation in terminal or don’t know what a program does?
brew info programname
That’s it for the daily syntax
There is other stuff to homebrew but read the full documentation if interested here https://docs.brew.sh/Formula-Cookbook#homebrew-terminology
Basics of homebrew on Linux official documentation https://docs.brew.sh/Homebrew-on-Linux
Thanks @MacHomebrew for making an amazing product and also letting us Linux users in on the fun!— Chris Titus Tech (@christitustech) August 1, 2022