如果你装了oh-my-zsh,iTerm2启动不再调用配置文件.bash_profile,而是直接调用.zshrc文件,这是如果你还把配置写在.bash_profile中,则不会失效。
此时你有两种解决方法:
- 把配置直接写在.zshrc中
- 配置还是写在.bash_profile中,但是要在.zshrc中添加一行
source ~/.bash_profile
如果你装了oh-my-zsh,iTerm2启动不再调用配置文件.bash_profile,而是直接调用.zshrc文件,这是如果你还把配置写在.bash_profile中,则不会失效。
此时你有两种解决方法:
source ~/.bash_profile