LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   environment variables (http://www.linuxquestions.org/questions/linux-newbie-8/environment-variables-12363/)

da Perp 01-22-2002 09:14 AM

environment variables
 
How can I set environment variables?
for example for my locale settings, or if i need to set a path for something?

acid_kewpie 01-22-2002 09:30 AM

LANG=en
LANGUAGE=en_GB:en
LC_COLLATE=en_GB
LC_CTYPE=en_GB
LC_MESSAGES=en_GB
LC_MONETARY=en_GB
LC_NUMERIC=en_GB
LC_TIME=en_GB

you mean that kinda stuff? set a variable with
VARIABLE=value on a command line or in a script file like /etc/rc.local, you must export all set veriables in a script file tho for them to be kept...

export VARIABLE

da Perp 01-22-2002 09:50 AM

so in rc.local i would add these variables, and then under the variables (still in the rc.local file) i would export each variable i added?did i understand correctly? thanx...

acid_kewpie 01-22-2002 10:36 AM

yeah, there are example in /etc/rc.local and /etc/profile and a few others.

DMR 01-22-2002 10:24 PM

Quote:

Originally posted by da Perp
...i would export each variable i added?...
As you might see from the examples acid_kewpie pointed to, each varialbe does have to be exported, but they can all be specified on a single line:

export VARIABLE1 VARIABLE2 VARIABLE3...

da Perp 01-23-2002 10:34 AM

yeah, i did all this stuff in my rc.local but it didnt help jackshit...
can i try it in my bashrc file?


All times are GMT -5. The time now is 10:54 PM.