User:Aimilius/Environment variables
Appearance
Using pam_env
The PAM module pam_env(8) loads the variables to be set in the environment from the following files: /etc/security/pam_env.conf, /etc/environment and ~/.pam_environment.
/etc/environmentmust consist of simpleVARIABLE=valuepairs on separate lines, for example:EDITOR=NANO
/etc/security/pam_env.confand~/.pam_environmentshare the same following format:VARIABLE [DEFAULT=value] [OVERRIDE=value]
@{HOME}and@{SHELL}are special variables that expand to what is defined in/etc/passwd. The following example illustrates how to expand theHOMEenvironment variable into another variable:XDG_CONFIG_HOME DEFAULT=@{HOME}/.configNote The variablesThe format also allows to expand already defined variables in the values of other variables using${HOME}and${SHELL}are not linked to theHOMEandSHELLenvironment variables, they are not set by default.${VARIABLE}, like this:GNUPGHOME DEFAULT=${XDG_CONFIG_HOME}/gnupgVARIABLE=valuepairs are also allowed, but variable expansion is not supported in those pairs. See pam_env.conf(5) for more information.
Note These files are read before other files, in particular before
~/.profile, ~/.bash_profile and ~/.zshenv.