Locale Settings IV
Set locale other than the default
If for some reason you need to localize a Linux system to a locale other than the default that
was configured at installation, you simply change the value of the appropriate environment variable.
Generally, all of these variables will be set to the same value (or the LC_ALL or LANG variable
will be used to specify the default locale for all variables). However, if necessary, you can also
set them independently to different values.
If you do this, however, be aware that not all of the LC_ variables have the same level of precedence.
Linux uses the following rules to determine which locale setting to use:
1. If the LC_ALL variable is defined, its value is used and the values assigned to all other
LC_ variables are not checked.
2. If LC_ALL is undefined, the specific LC_ variable in question is checked. If the specific
LC_ variable has a value, it is used.
3. If the LC_ variable in question has a null value, the LANG environment variable is used.
If you want all of your LC_ variables to use the same value, you can set the LC_ALL variable,
thus eliminating the need to set each individual variable. However, if you want to use different
values for your LC_ variables, you must first set LC_ALL to a null value. In fact, many distributions
leave LC_ALL undefined for this very reason. Instead, they set the value of LC_CTYPE to
define the default encoding and the value of LANG to provide a default value to all of your other
LC_ variables. However, because LANG is third in priority, you can manually set the value of an
LC_ variable without impacting any other LC_ variables.
LX0-104 Exam Objectives (M)
No comments:
Post a Comment