vi ~/.bashrc 添加 export 变量名=值 使环境变量生效 source ~/.bashrc 转载于:https://www.cnblogs.com/heishuichenzhou/p/10697657.html