Set environment variables on Mac OS X Lion

后端 未结 16 1213
余生分开走
余生分开走 2020-11-22 11:01

When someone says \"edit your .plist file\" or \"your .profile\" or \".bash_profile\" etc, this just confuses me. I have no idea where these files are, how to create them if

16条回答
  •  无人及你
    2020-11-22 11:31

    echo $PATH
    

    it prints current path value

    Then do vim ~/.bash_profile and write

    export PATH=$PATH:/new/path/to/be/added
    

    here you are appending to the old path, so preserves the old path and adds your new path to it

    then do

    source ~/.bash_profile
    

    this will execute it and add the path

    then again check with

    echo $PATH
    

提交回复
热议问题