.bashrc not getting sourced
Posted by: tculp
Posted on: 2006-01-28 08:01:00
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?
tim
Posted by: tculp
Posted on: 2006-01-28 08:01:00
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?
tim
Posted by: psross
Posted on: 2006-01-28 08:39:00
.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
Posted by: tculp
Posted on: 2006-01-28 09:37:00
Thanks, that did the trick.