PDA

View Full Version : What are environment variables?



Nutshell
02-18-2002, 01:57 AM
Hi,

What are environment variables? I see this term in dos and in some Linux stuff. What are they used for? Why need them? When use them? How to use them?

thnx

foniks munkee
02-18-2002, 02:59 AM
An environment variable is a variable maintained by your OS or shell that stores information regarding ones current operating environment.

For instance in the UNIX environment, you can query your shell for information regarding where you current temp directory is pointing at, what the max number of lines your history file will store - all sorts of fun things (and more important than these examples but.. my mind is real slow right now..). Very useful in shell programming - and just everyday admining..

Nutshell
02-18-2002, 03:16 AM
What are in windows?

maes
02-18-2002, 06:49 AM
in windows, right click on my computer=>properties=>advaced=>environment variables

ober
02-18-2002, 08:11 AM
environment variables can be anything from your temp file in windows to which editor loads when you type "ed" in linux at the command line.. the cool thing about linux is that it's so easy to setup your own environment variables so that the OS does what you want it to do exactly how you want it... Windows is a little more canned in this sense..