当前终端有效:
export PATH=/home/roger/shell:$PATH
所有终端有效:
[root@rhel6 ~]# vim /etc/profile export PATH=/home/roger/shell:$PATH [root@rhel6 ~]# source /etc/profile
当前用户有效:
[root@rhel6 ~]# vim .bashrc export PATH=/home/roger/shell:$PATH [root@rhel6 ~]# source .bashrc
转载于:https://blog.51cto.com/10960988/1791028