LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   .bash_profile (https://www.linuxquestions.org/questions/linux-software-2/bash_profile-603098/)

fakie_flip 11-28-2007 04:37 PM

.bash_profile
 
Quote:

Appending text to environment variables like your PATH should not be done in the .bashrc, because it gets run often when subshells are started. Place lines like this in your ~/.bash_profile:

PATH=$HOME/bin:$PATH # Adds to path, only in .bash_profile
That's according to the wiki at LQ about bash.

What about setting enviornment variables instead of appending? Which dot bash file should they be put in? Should these be put in .bashrc or .bash_profile and why and why not?

Code:

export BROWSER=evolution
export EDITOR=vim
MAIL=/var/spool/mail/chris && export MAIL


reddazz 11-28-2007 06:07 PM

I personally would use ~/.bash_profile due to the reasons explained here.


All times are GMT -5. The time now is 08:03 PM.