Environment Variables


Environment variables are name-value pairs that can be used to communicate information from a process to its descendants. They are typically used to provide programs with information about the environment in which they are executing (hence the name). Notable ones include:

DISPLAY the local or remote X Window display that should be used by default
PATH the list of paths to search when looking for an executable
PWD the current working directory
TERM the terminal type
TZ the default timezone

Environment variables are inherited from parent to child when new processes are created. Processes can freely alter their own environment variables but not those of other processes. In particular, changes made by a child process do not propagate back to its parent.


Further reading