Skip to content

Instantly share code, notes, and snippets.

@Justintime50
Last active January 12, 2024 16:41
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Justintime50/de232f266cea55faf82e9d65d5bd94c0 to your computer and use it in GitHub Desktop.
Save Justintime50/de232f266cea55faf82e9d65d5bd94c0 to your computer and use it in GitHub Desktop.
Use the following commands to setup Hombrew as a standard user getting around needing sudo access for most packages.

Standard User Owned Brew

Use the following commands to setup Hombrew as a standard user getting around needing sudo access for most packages.

NOTE: This still requires an admin to install Homebrew initially. After the ownership change, the standard user can use Homebrew moving forward.

Setup Homebrew for a Standard User

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Replace "USERNAME" with the username of your user:
sudo chown -R USERNAME $(brew --prefix)/*
chmod u+w $(brew --prefix)/*

Install Casks to Home Directory

To install applications with a non-admin account, you'll need to install them in the user's home application directory instead of the global applications directory. This won't require sudo access. Replace "USERNAME" below.

brew cask install myapp --appdir=/Users/USERNAME/Applications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment