vim /etc/profile在最后,添加:export 环境变量名="变量位置" 使用echo $环境变量来检查是否创建成功 转载于:https://www.cnblogs.com/wangqingbaidu/p/3843031.html