What is an environment variable?
An environment variable is like a global variable, however the scope extends to child processes of the program that declares it. They’re not exactly like global variables, because if a child process changes the value, the new value only applies to that child process, and new processes that child starts. An example of an environment variable is “username” — usually assigned when you start some kind of user interface, and attached to everything you do during that user session. Environment variables are used to declare search paths for executable programs, locations of special folders, local timezone, user preferences and other system parameters that tend to be constant during a user session.