Setting environment variables on OS X

后端 未结 30 3171
你的背包
你的背包 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:59

    All the magic on iOS only goes with using source with the file, where you export your environment variables.

    For example:

    You can create an file like this:

    export bim=fooo
    export bom=bar
    

    Save this file as bimbom.env, and do source ./bimbom.ev. Voilá, you got your environment variables.

    Check them with:

    echo $bim
    

提交回复
热议问题