1.临时设置环境变量: export PATH=/gg/gg/:$PATH 2.永久设置临时变量: vi /etc/profile 立即生效 source /etc/profile 3.查看当前环境变量: export