LFCS practice question 1 of 35
Which of the following commands should be added to /etc/bash_profile in order to change the language of messages for an internationalized program to Portuguese (pt)?
Full set: 260 questionsIn Linux, locale settings are controlled by a set of environment variables, typically prefixed with LC. The LCMESSAGES variable specifically governs the language and encoding used for displaying informational messages, error messages, and interactive prompts. By setting export LCMESSAGES="pt", you instruct internationalized programs to use their Portuguese message catalogs, if available. This command is placed in a profile script like /etc/bashprofile to apply the setting for users upon login.
A. LANGUAGE is a GNU extension that specifies a priority list of languages, used as a fallback if LCALL or LCMESSAGES is unset.
B. MESSAGE is not a standard environment variable for controlling locale message settings in Linux.
C. UIMESSAGES is not a standard environment variable for controlling locale message settings in Linux.
E. ALLMESSAGES is not a standard environment variable for controlling locale message settings in Linux.
1. locale(7) Linux manual page. The "ENVIRONMENT" section lists and describes the LC variables, stating that LCMESSAGES "determines the locale to be used for messages."
2. The GNU C Library (glibc) Manual, "1.4 Locale Categories." This section details the purpose of each LC category, defining LCMESSAGES for "messages which are printed by library functions or programs to the user."
3. Ubuntu Server Guide, "Localization." The section on "The LANG and LANGUAGE variables" explains the hierarchy and function of locale environment variables, including LCMESSAGES.
Keep practicing
Take the free LFCS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other LFCS practice questions
- Question 2Which of the following commands reboots the system when using SysV init? (Choose TWO corr…
- Question 3Which of the following tasks can be accomplished using the command date? (Choose TWO corr…
- Question 4Which of the following environment variables overrides or extends the list of directories…
- Question 5Which of the following are syslog facilities? (Choose TWO correct answers.)
- Question 6Which of the following programs uses the hosts.allow file to perform its main task of che…
- Question 7What does the ? symbol within regular expressions represent?
