.bash_profile

Discussion in 'Mac Programming' started by killerbunny, Nov 4, 2010.

  1. macrumors newbie

    Joined:
    Nov 4, 2010
    Location:
    Las Vegas
    #1
    Hello!

    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:

    Cheers!
     
  2. macrumors 6502

    Joined:
    Jun 23, 2003
    #2
    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).
     
  3. macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #3
    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.
     
  4. macrumors newbie

    Joined:
    Oct 24, 2010
    #4
    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
     

Share This Page