Bird
0
0

Given the following shell commands in your setup file:

medium📝 Command Output Q13 of 15
Linux CLI - Environment and Configuration
Given the following shell commands in your setup file:
export PATH="$HOME/bin:$PATH"
alias gs='git status'

What will be the effect when you open a new shell?
AThe shell will look for programs in $HOME/bin first and 'gs' runs 'git status'
BThe shell will ignore $HOME/bin and 'gs' will cause an error
CThe PATH variable will be empty and 'gs' will list files
DThe shell will crash due to syntax errors
Step-by-Step Solution
Solution:
  1. Step 1: Understand PATH modification

    The command export PATH="$HOME/bin:$PATH" adds the user's bin directory at the front of the PATH, so programs there run first.
  2. Step 2: Understand alias effect

    The alias gs='git status' means typing gs runs git status command.
  3. Final Answer:

    The shell will look for programs in $HOME/bin first and 'gs' runs 'git status' -> Option A
  4. Quick Check:

    PATH prepended + alias set = The shell will look for programs in $HOME/bin first and 'gs' runs 'git status' [OK]
Quick Trick: PATH prepends directories; alias shortcuts commands [OK]
Common Mistakes:
  • Thinking PATH ignores new directories
  • Assuming alias commands cause errors
  • Believing PATH resets to empty

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes