解决方法:
cd
vim .bash_profile
输入下面内容后 :wq 保存并退出
# .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
参考链接:https://blog.csdn.net/lei_qi/article/details/121694489