nerdexam
CompTIA

XK0-005 · Question #58

A junior systems is configuring localization option environment variables. The administrator is given a checklist of tasks with the following requirements: - View current settings of the LC_ALL…

The correct answer is A. echo $LC_ALL D. export LANG = en_US.UTF-8. 'echo $LC_ALL' (A) prints only the current value of the LC_ALL variable, satisfying the requirement to view that single variable. 'export LANG=en_US.UTF-8' (D) correctly sets and exports LANG for US English with UTF-8 Unicode encoding. Option B ('locale') displays all locale…

System Management

Question

A junior systems is configuring localization option environment variables. The administrator is given a checklist of tasks with the following requirements:

  • View current settings of the LC_ALL environment variable only.
  • Modify the LANG environment variable to US English Unicode.

Given this scenario, which of the following should be performed to meet these requirements? (Choose two.)

Options

  • Aecho $LC_ALL
  • Blocale
  • Ccat $LC_ALL
  • Dexport LANG = en_US.UTF-8
  • Eexport $LANG = en_US.UTF
  • Fstty

How the community answered

(23 responses)
  • A
    70% (16)
  • B
    4% (1)
  • C
    9% (2)
  • F
    17% (4)

Explanation

'echo $LC_ALL' (A) prints only the current value of the LC_ALL variable, satisfying the requirement to view that single variable. 'export LANG=en_US.UTF-8' (D) correctly sets and exports LANG for US English with UTF-8 Unicode encoding. Option B ('locale') displays all locale variables, not just LC_ALL. Option C ('cat $LC_ALL') attempts to open a file whose name is the value of LC_ALL-not a valid approach. Option E ('export $LANG = en_US.UTF') has two errors: the $ before LANG causes shell expansion of the variable name, and spaces around '=' are invalid in shell assignment syntax. Option F ('stty') configures terminal settings, unrelated to locale.

Topics

#Environment Variables#Localization#Shell Commands#Linux Administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice