设置开启终端自动读取 bashrc的方式:

Create a ~/.bash_profile file. If bash is started as a login shell it will first look for ~/.bash_profile before looking for ~/.profile. If bash finds ~/.bash_profile then it will not read ~/.profile.

Put the following lines in ~/.bash_profile:

[ -f "$HOME/.profile" ] && source "$HOME/.profile"
[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"

可搜索关键字:
Ubuntu – Configure gnome-terminal to start bash as a login shell, doesn’t read .bashrc

————————————————
版权声明:本文为CSDN博主「在路上@Amos」的原创文章,遵循CC 4.0 BY-SA版权协议
原文链接:https://blog.csdn.net/qq_33835307/article/details/122461782