Mac OS X 10.9 - setting permanent environment variables

前端 未结 5 1953
执念已碎
执念已碎 2020-12-01 04:09

How do I set a permanent environment variable (i.e. one that does not need exporting every time I start a new Terminal session) in Mac OS X 10.9? I\'ve found a number of ans

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 04:59

    Alternatively, you can also add the following command to your .bash_profile if you want your environment variables to be visible by graphic applications. In Mac OS X, graphic applications do not inherit your .bash_profile config :

    launchctl setenv MYPATH myvar
    

提交回复
热议问题