when typing env in my terminal one of the results is LC_TERMINAL_VERSION.
I've been wondering what it is, or if there's a way to get documentation on the different env vars that exist in my terminal
when typing env in my terminal one of the results is LC_TERMINAL_VERSION.
I've been wondering what it is, or if there's a way to get documentation on the different env vars that exist in my terminal
The answer from Alexis is the right answer for locale variables in general, and is good enough. I’m here to provide supplemental information for this specific variable, in case anyone is interested.
This variable was made popular by iTerm2, which is the only terminal (AFAIK) that exports them by default. iTerm2 actually exports two pairs of variables:
$TERM_PROGRAM and $TERM_PROGRAM_VERSION: this is to be compatible with Apple Terminal. Apple Terminal sets $TERM_PROGRAM to Apple_Terminal.$LC_TERMINAL and $LC_TERMINAL_VERSION: this is meant to be passed through SSH.$LC_TERMINAL and $LC_TERMINAL_VERSION are passed by SSH because many SSH servers have this in their SSH daemon configuration:
AcceptEnv LANG LC_*
which matches any variable starting with LC and an underscore. About how that works, see this answer in Unix SE site.
You should have two variables:
LC_TERMINAL=<terminal name> (i.e. "bash")
LC_TERMINAL_VERSION=<version> (the version of that LC_TERMINAL)
These variables can be used by tools that open a shell such as ssh. There are all sorts of ways to find out what shell to use when running ssh (and in the old days, telnet). Such variables make it easier.
The LC at the start mean locale. These parameters are used to define your locale: how to write phone numbers, a price, the date, the name of the month, etc.