Setting environment variables permanently.

Ray Parrish crp at cmc.net
Wed Mar 24 04:10:00 UTC 2010


Hello,

I am a little confused on the use of environment variables in Ubuntu. In 
windows I would simply set the variables value in the autoexec.bat file, 
and it would be available for use. I have been reading the man pages, 
and info pages for export, and env, and the following session has resulted.

ray at RaysComputer:~$ env Test="TestValue"

# much trimming done here to show the last line of the output.
Test=TestValue

ray at RaysComputer:~$ export -p Test
ray at RaysComputer:~$ env

# much trimming done here to show the last line of the output.
Test=TestValue
ray at RaysComputer:~$ echo $Test

ray at RaysComputer:~$

Hmmm, not persistent after the -p with export, and not persistent 
between bash sessions either. How do I set an environment variable which 
will always be available when I start a bash session, or run a bash script?

Thanks, Ray Parrish

-- 
Linux dpkg Software Report script set..
http://www.rayslinks.com/LinuxdpkgSoftwareReport.html
Ray's Links, a variety of links to usefull things, and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com






More information about the ubuntu-users mailing list