Skip to content

Instantly share code, notes, and snippets.

@jamonholmgren
Created April 12, 2026 17:48
Show Gist options
  • Select an option

  • Save jamonholmgren/e647aa48c4ea9724f3832622b343daf3 to your computer and use it in GitHub Desktop.

Select an option

Save jamonholmgren/e647aa48c4ea9724f3832622b343daf3 to your computer and use it in GitHub Desktop.
Set up homebrew without root on a standard user account.

Set up homebrew on a Standard User account

Per: https://x.com/jamonholmgren/status/2043385696535331324

mkdir -p "$HOME/homebrew"
git clone https://github.com/Homebrew/brew "$HOME/homebrew/.linuxbrew/Homebrew"
mkdir -p "$HOME/homebrew/bin"
ln -s "$HOME/homebrew/.linuxbrew/Homebrew/bin/brew" "$HOME/homebrew/bin/brew"
# Homebrew (per-user)
eval "$($HOME/homebrew/bin/brew shellenv)"
# Put casks in your user ~/Applications so we never need sudo
export HOMEBREW_CASK_OPTS="--appdir=$HOME/Applications"
mkdir -p "$HOME/Applications"
# Reload shell
exec $SHELL -l
# Verify
brew doctor
# Test by installing wget
brew install wget
wget "https://example.com"
# clean up
rm ./index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment