Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set environment variables on Mac OS X Sierra?

For example, I want to follow this guide on how to disable Brew analytics (under warning) but I have no idea how to find my environmental variables.

Most of the guides out there I found, such as this one, are all outdated; ~/.bash_profile doesn't exist according to how the answer described it. Can some please explain to a new MacOS user how all this now works?

Please note my understanding of Unix-based filesystems are limited. Treat me as a noob.

like image 311
bli00 Avatar asked Feb 19 '17 04:02

bli00


1 Answers

You can create ~/.bash_profile. The easiest way to create it is to use the touch utility: touch .bash_profile . It is common to have a .profile which is read if bash can not find .bash_profile. You can get the documentation from a terminal with man bash. You can edit either of these files with any text type editor (not word processor).

like image 77
Bill Avatar answered Sep 30 '22 17:09

Bill