Skip to content

Instantly share code, notes, and snippets.

@Justintime50
Last active June 29, 2023 15:24
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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