原因在于使用zsh时环境变量没有从原来的~/.bash_profile加入到~/.zshrc中
方法:
1.打开~/.zshrc文件
open ~/.zshrc
2.在文件中找到 #User configuration后,在下一行添加上:
source ~/.bash_profile
本文详细介绍了在切换到Zsh后,如何将原本在~/.bash_profile中的环境变量正确导入到~/.zshrc中,确保环境一致性。具体步骤包括打开~/.zshrc文件并在适当位置添加source ~/.bash_profile命令。
原因在于使用zsh时环境变量没有从原来的~/.bash_profile加入到~/.zshrc中
方法:
1.打开~/.zshrc文件
open ~/.zshrc
2.在文件中找到 #User configuration后,在下一行添加上:
source ~/.bash_profile
1087
2568

被折叠的 条评论
为什么被折叠?