vi /etc/profile 拉到最底部,添加 PATH=$PATH:要添加的路径 中间用 : 隔开多个路径 export PATH 保存,然后执行 source /etc/profile 就可以生效了