nerdexam
GIAC

GSNA · Question #188

John works as a Network Administrator for Perfect Solutions Inc. The company has a Debian Linux-based network. He is working on the bash shell in which he creates a variable VAR1. After some…

The correct answer is C. export VAR1. Since John wants to use the variable VAR1 as an environmental variable, he will use the export command to accomplish the task.

Linux/Unix System Auditing

Question

John works as a Network Administrator for Perfect Solutions Inc. The company has a Debian Linux-based network. He is working on the bash shell in which he creates a variable VAR1. After some calculations, he opens a new ksh shell. Now, he wants to set VAR1 as an environmental variable so that he can retrieve VAR1 into the ksh shell. Which of the following commands will John run to accomplish the task?

Options

  • Aecho $VAR1
  • Btouch VAR1
  • Cexport VAR1
  • Denv -u VAR1

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    3% (1)
  • C
    73% (22)
  • D
    17% (5)

Explanation

Since John wants to use the variable VAR1 as an environmental variable, he will use the export command to accomplish the task.

Topics

#export command#environment variables#bash shell#Linux administration

Community Discussion

No community discussion yet for this question.

Full GSNA Practice