Bird
0
0

Which command shows the value of the environment variable PATH in the current shell?

easy📝 Conceptual Q2 of 15
Linux CLI - Environment and Configuration
Which command shows the value of the environment variable PATH in the current shell?
Aset PATH
Becho $PATH
Cexport PATH
Dunset PATH
Step-by-Step Solution
Solution:
  1. Step 1: Identify how to display variable values

    Using echo $VARIABLE prints the value of that variable.
  2. Step 2: Check other commands

    set PATH lists shell variables but not just PATH; export PATH marks it for export; unset PATH deletes it.
  3. Final Answer:

    echo $PATH -> Option B
  4. Quick Check:

    echo $VAR = print variable value [OK]
Quick Trick: Use echo $VAR to see variable value [OK]
Common Mistakes:
  • Using unset to display variable
  • Confusing export with print
  • Using set without arguments

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes