配置环境变量三种常用的方法

临时设置



export PATH=/opt/android-studio/bin:$PATH

当前用户全局设置



vim ~/.profile,添加行: 


export PATH=/opt/android-studio/bin:$PATH 


使生效 


source .profile

所有用户的全局设置



vim /etc/profile 


在里面加入: 


export PATH=/opt/android-studio/bin:$PATH 


使生效 


source /etc/profile

results matching ""

    No results matching ""