修改以下三个文件中的一个就可以了,只是权限不同: 对整个生效的 etc/profile 对根的宿主生效 /root/.bash_profile 对普通用户生效的 /home/abc/.bash_profile