Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Explain what are environment variables, what they do, with what they interact in OS. Are Linux environment variables different from Windows?

Thanks a lot!

share|improve this question

closed as too broad by gronostaj, Tog, mpy, DragonLord, Darth Android Jun 27 '13 at 20:25

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

5  
did you even try to search online first? The number one result on google for environment variables is that wikipedia article –  James Jun 26 '13 at 13:04
    
@NaVi That's a good question. Very few people think about the environment variables is deeper than it is publicly available Internet resources. Especially in the form of synthesis. We all have different views even on everyday things. Different experiences. Different thinking universes. I wish the author always ask simple-tough questions. Good luck! –  STTR Jun 26 '13 at 14:14
add comment

2 Answers

up vote 0 down vote accepted

Environment variables - a short catalog:

1/ Hardware configuration:

set PROCESSOR

output:

PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=EM64T Family 6 Model 23 Stepping 7, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1707

2/ Program resources:

echo %ProgramFiles%`

Output:

C:\App64

3/ Important places:

echo %ALLUSERSPROFILE%

Output:

ALLUSERSPROFILE=C:\Users\All Users

Environment variables are important for:

  1. programs
  2. other systems.
  3. people (system administrators, programmers, users)

Environment variables simplify:

  1. definition capabilities of the system
  2. definition of the runtime
  3. search for the missing resources
share|improve this answer
add comment

This has a lot of great information that will answer all your questions: http://en.wikipedia.org/wiki/Environment_variables

The opening paragraph essentially answers your question

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. They are part of the operating environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process. They were introduced in their modern form in 1979 with Version 7 Unix, so are included in all Unix operating system flavors and variants from that point onward including Linux and OSX. From PC-DOS 2.0 in 1982, all succeeding Microsoft operating systems including Microsoft Windows, and OS/2 also have included them as a feature, although with somewhat different syntax, usage and standard variable names.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.