CompTIA Linux+ Powered by LPI (LX0-103) — Question 1

Which of the following command sets the Bash variable named TEST with the content FOO?

Answer options

Correct answer: D

Explanation

The correct answer is D because it properly assigns the value FOO to the variable TEST in Bash syntax without spaces around the equals sign. Option A is incorrect as 'set' is not required for variable assignment in this context, Option B is wrong due to the spaces around the equals sign, and Option C uses 'var' which is not valid in Bash.