Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Environment variables are values that impact the processes and behavior of running computer systems and OS environments. Running programs may access environment variable values for configuration purposes.
For example, a specifically named environment variable may identify the computer OS location used for temporary file storage. The Microsoft Windows environment variable for temporary file storage is %TEMP% or %TMP%.
Unix systems have specific and proprietary environment variables. A new process inherits a duplicate parent environment from its parent without changes to the parent. These conversions must occur at the application programming interface (API) level between fork and exec. In contrast, environment variables for specific command executions alter shell platforms - such as bash - by invoking env.
Although all UNIX and Microsoft OSs have environment variables, names are never shared by OS programmers. For design purposes, running programs can manipulate environment variable values. Unix callers determine memory spaces running with various setuid program authorities. The dynamic linker loads corresponding code, known as environment variable locations (LD_LIBRARY_PATH and LD_PRELOAD). Code runs according to the process authority.