Bird
0
0

After running export PATH=/usr/local/bin, your scripts in /usr/bin stop working. How to fix this?

medium📝 Debug Q7 of 15
Linux CLI - Environment and Configuration
After running export PATH=/usr/local/bin, your scripts in /usr/bin stop working. How to fix this?
ARestart the terminal
BChange to <code>export PATH=/usr/local/bin:$PATH</code>
CRun <code>source ~/.bashrc</code>
DUse <code>set PATH=/usr/local/bin</code>
Step-by-Step Solution
Solution:
  1. Step 1: Identify PATH overwrite issue

    Setting PATH without old PATH removes access to /usr/bin scripts.
  2. Step 2: Fix by prepending new path

    Use export PATH=/usr/local/bin:$PATH to keep old paths.
  3. Final Answer:

    Change to export PATH=/usr/local/bin:$PATH -> Option B
  4. Quick Check:

    Keep old PATH by including $PATH [OK]
Quick Trick: Always include $PATH to avoid losing commands [OK]
Common Mistakes:
  • Restarting terminal unnecessarily
  • Using set instead of export
  • Not including old PATH

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes