Environment Variables (1/2)

Definition

The terms environment and environment variables are used in a lot of slightly different contexts. Giving a universal definition is therefore difficult. We give a possible definition below and also point the reader to other definitions.

Environment variables are a mechanism to exchange information between a program and the system on which it is running. The system will associate an environment (i.e. a list of environment variables) with each program on the system. The program can then get the values of the variables defined in the associated environment. It can also update existing variables and create new ones.

For other definitions see Wikipedia: Environment Variable [1], TechTarget's definition of an environment variable [2], The GNU C Programming Tutorial [3] or The Linux Tutorial [4].

Environment variables are best used to store information that is unlikely to change very often. Command line arguments would typically be used for information that changes often.

References

  1. Wikipedia: Environment Variable
  2. TechTarget's definition of an environment variable
  3. The GNU C Programming Tutorial
  4. The Linux Tutorial

Copyright(c) 2006-2015 Xavier Leclercq | Privacy policy

Home
Contact Us
Search