The locale command prints a list of environmental variables containing info related to the users locale:$localeLANG=en_US.UTF-8LC_CTYPE=en_US.UTF-8LC_NUMERIC=en_US.UTF-8LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8LC_PAPER=en_US.UTF-8LC_NAME=en_US.UTF-8LC_ADDRESS=en_US.UTF-8LC_TELEPHONE=en_US.UTF-8LC_MEASUREMENT=en_US.UTF-8LC_IDENTIFICATION=en_US.UTF-8LC_ALL=Why don't I see these variables when I run printenv or env?
Why don't locale variables show up in the output of env or printenv?
environment variables;locale
The locale command does not print environment variables.  It prints the state of the user's locale, whether set by environment or by inference.For example, if LC_TIME is not set, its value is taken from LANG.  And if LC_ALL is set, all other settings are overriden.Try it:$ LANG=ja_JP.utf8 localeLANG=ja_JP.utf8LANGUAGE=en_GB:enLC_CTYPE=ja_JP.utf8LC_NUMERIC=ja_JP.utf8LC_TIME=ja_JP.utf8LC_COLLATE=ja_JP.utf8LC_MONETARY=ja_JP.utf8LC_MESSAGES=ja_JP.utf8LC_PAPER=ja_JP.utf8LC_NAME=ja_JP.utf8LC_ADDRESS=ja_JP.utf8LC_TELEPHONE=ja_JP.utf8LC_MEASUREMENT=ja_JP.utf8LC_IDENTIFICATION=ja_JP.utf8LC_ALL=$ LANG=ja_JP.utf8 LC_CTYPE=en_GB.UTF-8 localeLANG=ja_JP.utf8LANGUAGE=en_GB:enLC_CTYPE=en_GB.UTF-8LC_NUMERIC=ja_JP.utf8LC_TIME=ja_JP.utf8LC_COLLATE=ja_JP.utf8LC_MONETARY=ja_JP.utf8LC_MESSAGES=ja_JP.utf8LC_PAPER=ja_JP.utf8LC_NAME=ja_JP.utf8LC_ADDRESS=ja_JP.utf8LC_TELEPHONE=ja_JP.utf8LC_MEASUREMENT=ja_JP.utf8LC_IDENTIFICATION=ja_JP.utf8LC_ALL=$ LANG=ja_JP.utf8 LC_CTYPE=en_GB.UTF-8 LC_ALL=POSIX localeLANG=ja_JP.utf8LANGUAGE=en_GB:enLC_CTYPE=POSIXLC_NUMERIC=POSIXLC_TIME=POSIXLC_COLLATE=POSIXLC_MONETARY=POSIXLC_MESSAGES=POSIXLC_PAPER=POSIXLC_NAME=POSIXLC_ADDRESS=POSIXLC_TELEPHONE=POSIXLC_MEASUREMENT=POSIXLC_IDENTIFICATION=POSIXLC_ALL=POSIXYou will observe that computed values are shown in double quotes and those that are explicitly set by environment variables are unquoted.