.bashrc not getting sourced


Whenever I log in using ssh, I have to manually source my .bashrc file. My default shell is set to /bin/bash. Has anyone else had this problem?



.bashrc is only executed for interactive non-login shells (see the Invocation section of man bash).

.bash_profile is executed for login shells. I use the following lines in my .bash_profile to execute .bashrc if it exists:

if [ -f ~/.bashrc ]; then . ~/.bashrc fi


Thanks, that did the trick.