Centos 修改环境变量 环境变量文件路径 添加一个X变量,在etc/profile 尾部添加 X=12345即可 输入命令 vim /etc/profile 变量生效 source /etc/profile 测试结果