WebReinvent Internal Docs
Mac Setup

Brew Setup

Multiple instances

  • When you have multiple users, you don't want to use same brew for all users.
  • i.e. Once you install brew for your main user/ administrator/ root user, you don't want to share that installation with other users ideally.
  • So you need to install brew for other user without sudo. For that please check the below steps.

1. Switch to the user for which you want to install brew

2. Open terminal

  • Press command + space and search for terminal.

3. Change directory to home

  • In the terminal type below command and press return/enter.
cd ~

4. Download and install brew

  • Running below command will create a directory named homebrew and will install brew in that directory.
  • In the terminal type below command and press return/enter.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

5. Add the path in profile

  • Open (or create) the rc file for your shell. Check rc file section.
  • And after the file opens add following path, save the file and close it.
export PATH=$HOME/homebrew/bin:$PATH

6. Close the terminal entierly

  • Press command + q

7. Open the terminal and verify the installation

  • In the terminal type the below command and press return/enter
brew --version

References


Copyright © 2024