在OS X上設置環境變量 - Setting environment variables on OS X

問題:

What is the proper way to modify environment variables like PATH in OS X? 在OS X中修改環境變量(如PATH)的正確方法是什麼? bash

I've looked on Google a little bit and found three different files to edit: 我稍微看了一下Google,發現須要編輯三個不一樣的文件: spa

  • /etc/paths / etc /路徑
  • ~/.profile 〜/ .profile
  • ~/.tcshrc 〜/ .tcshrc

I don't even have some of these files, and I'm pretty sure that .tcshrc is wrong, since OS X uses bash now. 我什至沒有這些文件,並且我很肯定.tcshrc是錯誤的,由於OS X如今使用bash。 Where are these variables, especially PATH, defined? 這些變量(尤爲是PATH)在哪裏定義? .net

I'm running OS X v10.5 (Leopard). 我正在運行OS X v10.5 (Leopard)。 three


解決方案:

參考一: https://stackoom.com/question/ZIW/在OS-X上設置環境變量
參考二: https://oldbug.net/q/ZIW/Setting-environment-variables-on-OS-X
相關文章
相關標籤/搜索