🐧 Linux / Shell Scripting
Beginner
What are environment variables?
Answer
Environment variables are named values stored in a process's environment that affect behavior of running processes and shells. They are inherited by child processes. Common ones: PATH (directories searched for executables), HOME (home directory), USER (current username), SHELL (current shell), PWD (current directory), LANG (locale), TERM (terminal type). Set a variable: export VAR=value. The export keyword makes it available to child processes. Without export, it's a local shell variable only. Applications use env vars for configuration (e.g., DATABASE_URL, API_KEY).