Getting bashrc to work in Mac OS 10.6 Snow Leopard

I just got a new Mac on Wednesday, so naturally I’ve been configuring it to my liking bit by bit. I made the discovery that Snow Leopard doesn’t seem to support /Users/yourusername/.bashrc out of the box.

No worries though, there is an easy fix!

Open up Terminal and type:

sudo vi /etc/bashrc

Then at the end of the file, add the following line:

source ~/.bashrc

Then, cd to /Users/yourusername and create a .bashrc file. If you’re not sure what you’re going to put in it just yet, at least do the following:

touch /Users/yourusername/.bashrc

So that you don’t get an error next time you open a shell ;-).

Hopefully that saves someone else some time!