View Full Version : .bash_profile

Nov 4, 2010, 11:28 PM

I am attempting to learn Ruby on Rails on my own. To install RVM, I need to update a file named .bash_profile. I know it's hidden, and it doesn't exist. Neither does .bashrc.

I can create the files in Terminal or TextWranger, I just don't know what they should have in them by default.

All help is appreciated, and I'm sorry for being a pest! :rolleyes:


Nov 5, 2010, 05:59 AM
They don't need to have anything by default -- if they aren't there and you've been getting along fine, then creating blank files won't change anything.

That said, those files are bash commands that are executed when you open a Terminal window (mostly, there are some subtle differences between bashrc and bash_profile, but it's common practice to have one call the other).

Nov 5, 2010, 08:58 AM
the bash_profile and bashrc files do have a couple of subtle differences.

The profile file is only read once the first time you log in, whereas the rc file is read every time you open a new terminal.

Nov 8, 2010, 09:15 AM
Are you using the terminal? If not, start -- all good programmers do. :D

Second, if you want to see even hidden files, you can pass the "ls" command the -a option for "all". If you open a terminal you should be in your home directory. Simply type "ls -a" to see a list files. "ls -la" to see them w/ more details. My personal favorite is "ls -latr" to see them all in reverse order by modify time.

Outside Reading (http://en.wikipedia.org/wiki/Ls)