Jul 19, 2012

Profile in OSX

So turns out that on Mac OS X Snow Leopard as well as Mac OS X Lion, the file that's loaded is called .profile, not .bashrc. What you want to do is create a file in ~/.profile and call it .profile (if it doesn't already exists). Put whatever information you needed to load with each instance of bash there (Thanks, thepurplepixel).
A couple of side notes: The period in front of the file marks it as invisible to Finder and the ls command by default.
To list invisible files using the ls command from Terminal, use the -a as a parameter as such: ls -a The ~ symbol stands for /Users/YourUserName where YourUserName is your username's shortname.

Edit: Chris Page notes (correctly) that whatever you place in a .profile file will apply to whatever shell you're using (i.e. zhs, bash, et cetera). If you want the contents to affect only the bash shell, place the contents in a .bash_profile file instead of a .profile file.

No comments:

Down with the Dictatorship!

    "Let them hate me, so that they fear me" - Caligula 41AD