Environment Variables wont stay

Hi,
I’m ROOT 5.27 on SLC 5. I built the root package from source myself.

I set the environment variables with:
export ROOTSYS=/root/root
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ROOTSYS}/lib

but the thing is it keeps disapearing… I havent noticed a pattern but I consistently have to reset the environment variables to run root. Sometimes as quick as I can run root and shut it down and other times after 20 mins or so.

It’s very irritating and time consuming while I’m trying to complete my work, anyone have a fix or some insight on this?

[quote] I havent noticed a pattern but I consistently have to reset the environment variables to run root[/quote]The only way shell variable disappear are when you exit the shell, start a new shell or (indirectly or not) change them. One likely cause is that you use a script that change those variables.

Philippe.

Thanks for your response —
Being a linux nooby along with a root nooby, I followed the documentation to define the variables

export ROOTSYS=/root/root
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ROOTSYS}/lib

and did so in terminal. Thanks to what you said about the shells, I learned I need to add these commands to my profile.

For SLC5 profile was ($HOME)/.bash_profile

Thanks again!