centos添加PATH环境变量时间:2021-08-09 08:14:231.cd ~ 2.vi .bashrc 3.在代码末尾增加一行: export PATH =/path/to/target-dir/bin:$PATH 4.source .bash_profile立即生效