Setting environment variables on OS X

后端 未结 30 3174
你的背包
你的背包 2020-11-21 05:15

What is the proper way to modify environment variables like PATH in OS X?

I\'ve looked on Google a little bit and found three different files to edit:

30条回答
  •  抹茶落季
    2020-11-21 05:55

    1. Do:

      vim ~/.bash_profile
      

      The file may not exist (if not, you can just create it).

    2. Type in this and save the file:

      export PATH=$PATH:YOUR_PATH_HERE
      
    3. Run

      source ~/.bash_profile
      

提交回复
热议问题