nerdexam
CompTIA

XK0-006 · Question #65

A Linux administrator wants to make the ENABLE_AUTH variable set to 1 and available to the environment of subsequently executed commands. Which of the following should the administrator use for this…

The correct answer is D. export ENABLE_AUTH=1. The export command sets an environment variable and makes it available to subsequently executed commands and child processes, ensuring ENABLE_AUTH=1 is recognized system- wide in that shell session.

Automation, Orchestration, and Scripting

Question

A Linux administrator wants to make the ENABLE_AUTH variable set to 1 and available to the environment of subsequently executed commands. Which of the following should the administrator use for this task?

Options

  • Alet ENABLE_AUTH=1
  • BENABLE_AUTH=1
  • CENABLE_AUTH=$(echo $ENABLE_AUTH)
  • Dexport ENABLE_AUTH=1

How the community answered

(31 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    94% (29)

Explanation

The export command sets an environment variable and makes it available to subsequently executed commands and child processes, ensuring ENABLE_AUTH=1 is recognized system- wide in that shell session.

Topics

#export#environment variables#bash#shell

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice