Dup Ver Goto 📝

Bashrc-vs-Profile

PT2/linux/shell does not exist
To
12 lines, 71 words, 530 chars Page 'Bashrc-vs-Profile' does not exist.

See e.g. this at baeldung.com

Basically, in an interactive login shell

  1. `/etc/profile
  2. User profile
    1. ~/.bash_profile if present; else
    2. ~/.bash_login if present; else
    3. ~/.profile if present but not .bashrc. Thus usually, .bashrc is 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.