Install HomeBrew (Linux)


Wed Feb 02 2022 22:12:47 GMT+0000 (UTC)

Saved by @jimbrig #installation #linux #bash #wsl

!#/usr/bin/env bash

# update and ensure build-essentials/git
sudo apt update
sudo apt-get install build-essential curl file git

# install homebrew
/bin/bash -c "$(curl -fsSL"

# add to PATH
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/jimbrig/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
source ~/.profile

# test
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

brew doctor

# gcc installation
brew install gcc

# initial installations
brew install topgrade git-crypt git-cliff

- Adds necessary startup commands to `~/.profile` by default instead of `~/.bashrc` or `~/.zshrc`. - Adds to `%PATH%` and refreshes - Runs `brew doctor` - Installs `gcc` post homebrew installation - Uninstall via `/bin/bash -c "$(curl -fsSL"` (See []( Some initial installations here are: - TopGrade - Git-Crypt - Git-Cliff