Bird
0
0

A user adds export PATH=$PATH:/new/path to .bashrc but finds the new path is not included after opening a new terminal. What is the most likely cause?

medium📝 Debug Q7 of 15
Linux CLI - Environment and Configuration
A user adds export PATH=$PATH:/new/path to .bashrc but finds the new path is not included after opening a new terminal. What is the most likely cause?
AThe syntax for export is invalid
BThe .bashrc file is not sourced by the shell on startup
CThe new path does not exist on the system
DPATH cannot be modified in .bashrc
Step-by-Step Solution
Solution:
  1. Step 1: Verify export syntax

    The syntax export PATH=$PATH:/new/path is correct.
  2. Step 2: Understand shell startup files

    If .bashrc is not sourced (run) on shell startup, changes inside it won't apply.
  3. Final Answer:

    The .bashrc file is not sourced by the shell on startup -> Option B
  4. Quick Check:

    Shell must source .bashrc to apply changes [OK]
Quick Trick: Ensure .bashrc is sourced on shell start [OK]
Common Mistakes:
  • Assuming syntax error in export
  • Thinking PATH is immutable
  • Ignoring shell startup file behavior

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes