Environment variables in Mac OS X

后端 未结 9 1718
萌比男神i
萌比男神i 2020-11-22 14:57

Update: The link below does not have a complete answer. Having to set the path or variable in two places (one for GUI and one for shell) is lame.

No

9条回答
  •  再見小時候
    2020-11-22 15:07

    Just open the ~/.profile file, via nano in Terminal and type there :

    export PATH=whatever/you/want:$PATH
    

    Save this file (cmd+X and Y). After that please logout/login again or just open a new tab in Terminal and try use your new variable.

    PLEASE DON'T forget to add ":$PATH" after whatever/you/want, otherwise you'll erase all paths in PATH variable, which were there before that.

提交回复
热议问题