问题:使用bash出现
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
原因:升级了macOS Catalina,新系统的shell已经更换为zsh。
解决办法:
- 不使用bash,切换zsh,
chsh -s /bin/zsh
命令切换即可。 - 继续使用bash。
-输入vim ./.bash_profile
回车,然后就打开了bash_profile文件。
-点击i
建进入编辑状态,添加export BASH_SILENCE_DEPRECATION_WARNING=1
,这样一个环境变量就添加上了。
-点击esc
退出编辑状态,输入:wq
回车保存退出。
-输入source ~/.bash_profile
,让配置文件在修改后立即生效。