See e.g. this at baeldung.com
Basically, in an interactive login shell
- `/etc/profile
- User profile
~/.bash_profileif present; else~/.bash_loginif present; else~/.profileif present but not.bashrc. Thus usually,.bashrcis sourced by the.profile.
The issue is the overhead in setting everything up, since .bashrc is run
every time a new shell is opened, and most variables can be inherited from the login shell.