Terminal not parsing .bashrc?

Discussion in 'macOS' started by iW00t, Jan 4, 2008.

  1. iW00t macrumors 68040


    Nov 7, 2006
    Defenders of Apple Guild
    I have been setting some environmental variables within the file ~/.bashrc, but it seems like it is not automatically loading the contents of this file each time I open a new terminal window, I have to manually type in source ~/.bashrc in order to get my variables imported.

    Is there a way to make it automatic?
  2. fletchnj macrumors newbie

    Dec 31, 2007
    what does your .bash_profile look like? I just set mine up with the following in my .bash_profile, and it's working.

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

    export PS1='\[\e[0;31m\]\u\[\e[0m\]\[\e[1;31m\]@\[\e[0m\]\[\e[0;31m\]\H\[\e[0m\] \w $ '
    source ~/.bashrc

Share This Page