How to fix Terminal not loading ~/.bashrc on OS X Lion [closed] How to fix Terminal not loading ~/.bashrc on OS X Lion [closed] bash bash

How to fix Terminal not loading ~/.bashrc on OS X Lion [closed]


Terminal opens a login shell. This means, ~/.bash_profile will get executed, ~/.bashrc not.

The solution on most systems is to "require" the ~/.bashrc in the ~/.bash_profile: just put this snippet in your ~/.bash_profile:

[[ -s ~/.bashrc ]] && source ~/.bashrc


Renaming .bashrc to .profile (or soft-linking the latter to the former) should also do the trick. See here.


I have the following in my ~/.bash_profile:

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

If I had .bashrc instead of ~/.bashrc, I'd be seeing the same symptom you're seeing.