DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for 🍺 Setup Homebrew on Linux with Fish Shell 🐠
Thomas Gotwig
Thomas Gotwig

Posted on

🍺 Setup Homebrew on Linux with Fish Shell 🐠

🧐 Installing requirements

Like described on docs.brew.sh/Homebrew-on-Linux.

For Debian or Ubuntu:

sudo apt install -y build-essential procps curl file git
Enter fullscreen mode Exit fullscreen mode

For 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
Enter fullscreen mode Exit fullscreen mode

🍺 Installing brew

Execute the following one from your fish shell:

sudo curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh \
  | bash
Enter fullscreen mode Exit fullscreen mode

Then that one which will update your config.fish:

eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)
echo 'eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)' \
  >> ~/.config/fish/config.fish
Enter fullscreen mode Exit fullscreen mode

🍻 Installing packages with brew

Now you should be able to install things with brew like that:

brew install hello
Enter fullscreen mode Exit fullscreen mode

Running hello should print the following:

Hello, world!
Enter fullscreen mode Exit fullscreen mode

Nice! But one more thing 🧐 The creators recommend to have gcc installed, so lets fix this:

brew install gcc
Enter fullscreen mode Exit fullscreen mode

Done! Have fun with brew 🍺😊

Top comments (0)

Let's Get Wacky


Use any Linode offering to create something unique or silly in the DEV x Linode Hackathon 2022 and win the Wacky Wildcard category

β†’ Join the Hackathon <-