Bird
0
0

Which option correctly switches to user john and loads his environment variables?

easy📝 Conceptual Q2 of 15
Linux CLI - Users and Groups
Which option correctly switches to user john and loads his environment variables?
Asu - john
Bsu john -l
Csu -- john
Dsu john
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to switch user with environment

    The su - username syntax switches user and loads their environment variables.
  2. Step 2: Compare options

    su john switches user but does not load environment fully; su - john does; others are invalid or incorrect syntax.
  3. Final Answer:

    su - john -> Option A
  4. Quick Check:

    Load user env = su - username [OK]
Quick Trick: Use dash (-) to load user environment [OK]
Common Mistakes:
  • Omitting the dash and missing environment variables
  • Using invalid options like --
  • Placing -l after username incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes