Bird
0
0

You added alias gs='git status' to your .bashrc file but running gs in a new terminal gives command not found. What is the most probable cause?

medium📝 Debug Q6 of 15
Linux CLI - Environment and Configuration
You added alias gs='git status' to your .bashrc file but running gs in a new terminal gives command not found. What is the most probable cause?
AThe <code>git</code> command is not installed on the system
BThe alias syntax is incorrect and should use double quotes instead of single quotes
CYou forgot to reload the <code>.bashrc</code> file or start a new shell session
DAliases cannot be defined in <code>.bashrc</code> files
Step-by-Step Solution
Solution:
  1. Step 1: Check alias definition

    The alias alias gs='git status' is syntactically correct.
  2. Step 2: Verify shell environment

    Aliases defined in .bashrc are loaded only when the file is sourced or a new shell session starts.
  3. Step 3: Reload .bashrc

    Run source ~/.bashrc or open a new terminal to activate the alias.
  4. Final Answer:

    You forgot to reload the .bashrc file or start a new shell session -> Option C
  5. Quick Check:

    Define alias, reload shell [OK]
Quick Trick: Always reload shell after adding aliases [OK]
Common Mistakes:
  • Assuming alias works immediately without reloading shell
  • Using wrong alias syntax
  • Thinking aliases are global without sourcing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes