直接说操作 #创建配置文件 touch .zshrc #写入要source的文件到 ~/.zshrc echo "source ~/.bash_profile\nsource ~/.bashrc" >> ~/.zshrc 原因 不想深究 暂且简单认为 .bash_profile 临时配置,每次进入终端都要source;而.zshrz是直接每次重启终端是调用的。