The Bash manual actually explains these files fairly thoroughly. However, the manual does not describe how these mechanisms are usually used in practice. What follows is a brief, abridged version of what is common best practice.
.profile
is read at login by both sh
and bash
.
.bashrc
is read by non-login Bash shells. By convention, .bash_profile
sources .bashrc
in turn.
.bash_profile
is read at login by Bash. If this file exists, .profile
is not read. By convention, .bash_profile
should source .profile
if it exists.