I have read that
.bashrc is loaded when you open a non login shell (for example:
xterm), and indeed when I opened
.bashrc was loaded.
But when I opened a login shell (Ctrl+Alt+F#),
.bashrc was also loaded!
I am using Ubuntu.
In Ubuntu, the user's default
~/.profile (copied from
/etc/skel/.profile at account creation time) includes the following section:
# if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi
Hence, if the login shell is
bash, it will source the user's
~/.bashrc as well.