Environment variables in Mac OS X

后端 未结 9 1661
萌比男神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:20

    For 2020 Mac OS X Catalina users:

    Forget about other useless answers, here only two steps needed:

    1. Create a file with the naming convention: priority-appname. Then copy-paste the path you want to add to PATH.

      E.g. 80-vscode with content /Applications/Visual Studio Code.app/Contents/Resources/app/bin/ in my case.

    2. Move that file to /etc/paths.d/. Don't forget to open a new tab(new session) in the Terminal and type echo $PATH to check that your path is added!

    Notice: this method only appends your path to PATH.

提交回复
热议问题