linux命令 source

由于/etc/profile与~./bash_profile都是在取得login shell时才会读取的配置文件,所以,如果想让修改后的配置生效,通常需要重启机器。source命令可以让配置文件在机器不重启的情况下重新读取配置。

source configfile 或 . configfile

例外,Python中启动虚拟环境,也是用的source,即source venv/bin/activate

原文地址:https://www.cnblogs.com/yangxiaoling/p/10546030.html