From the bash documentation:
When and how Bash executes startup files.
For Login shells (subject to the -noprofile option):
On logging in:
If `/etc/profile' exists, then source it.
If `~/.bash_profile' exists, then source it,
else if `~/.bash_login' exists, then source it,
else if `~/.profile' exists, then source it.
On logging out:
If `~/.bash_logout' exists, source it.
For non-login interactive shells (subject to the -norc and -rcfile options):
On starting up:
If `~/.bashrc' exists, then source it.
For non-interactive shells:
On starting up:
If the environment variable ENV is non-null, expand the
variable and source the file named by the value. If Bash is
not started in Posix mode, it looks for BASH_ENV before
ENV.
|