Ubuntu中设置环境变量PATH 目前在Ubuntu中有二种设置PATH环境变量的方法。 为单一用户: 打开用户主目录下的.bashrc,在这个文件中加入export PATH=”$PATH:/your path1/:/your path2/…..” 重启或注销就好了。 全局设置: 在/etc/profile中增加 PATH="$PATH:/home/zhengb66/bin" export PATH OK,完成设置。