Bird
0
0

You run export PATH=/new/path but your shell still finds commands in old directories. What is the likely problem?

medium📝 Debug Q6 of 15
Linux CLI - Environment and Configuration
You run export PATH=/new/path but your shell still finds commands in old directories. What is the likely problem?
AYou must use set instead of export
BYou need to restart the computer
CYou forgot to include the old PATH in the new assignment
DThe PATH variable cannot be changed
Step-by-Step Solution
Solution:
  1. Step 1: Understand PATH overwrite

    Assigning PATH without including old PATH removes old directories.
  2. Step 2: Identify missing old PATH

    Not including $PATH means shell won't find old commands.
  3. Final Answer:

    You forgot to include the old PATH in the new assignment -> Option C
  4. Quick Check:

    Always include $PATH to keep old dirs [OK]
Quick Trick: Include $PATH when changing PATH to keep old dirs [OK]
Common Mistakes:
  • Thinking restart is needed
  • Believing PATH is immutable
  • Using set instead of export

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes