脚本source生效问题 Posted on 2024-06-04 Edited on 2026-06-20 Views: 一键安装脚本,有添加bin到/etc/profile.d/xxx.sh在脚本中.source /etc/profile在当前shell没有生效,必须重新打开ssh登录才可以. env centos7.x 经过验证发现,可以用source /etc/profile.d/xxx.sh即可解决当前的问题