Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding home-brew to PATH

I just installed Home-brew and now I'm trying to insert the home-brew directory at the top of my path environment variable by typing in two commands inside my terminal. My questions are these:

What is a path environment variable?

Are the two codes provided me correct?

echo "export Path=/usr/local/bin:$PATH" >> ~/.bash_profile && source  ~/.bash_profile

After this I am to type in brew doctor. Nothing is happening as far as I can see. Can anyone offer me some advice or direction?

like image 753
artison66 Avatar asked Feb 28 '16 00:02

artison66


People also ask

How do I set the path for BREW on Mac?

Alternatively, you can also insert /usr/local/bin before the first line of /etc/paths to change the global default paths order, for all users and all major shells. An admin password will be required if you modify the file. If everything is good, you should see no warnings, and a message that you are "ready to brew!".

Where is Homebrew installed on Mac M1?

Mac M1 (Apple silicon) On Apple silicon, Homebrew installs files into the /opt/homebrew/ folder, which is not part of the default shell $PATH . You'll need to configure your shell environment so Homebrew packages are found and take priority over pre-installed tools.


1 Answers

I installed brew in my new Mac M1 and ask me to put /opt/homebrew/bin in the path, so the right command for this case is:

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile
like image 51
Lucas Tettamanti Avatar answered Sep 20 '22 19:09

Lucas Tettamanti