Bird
0
0

Which of the following is the correct syntax to create an alias named gs for the command git status?

easy📝 Syntax Q12 of 15
Linux CLI - Environment and Configuration
Which of the following is the correct syntax to create an alias named gs for the command git status?
Aalias gs = git status
Balias gs='git status'
Calias 'gs' = 'git status'
Dalias gs: git status
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct alias syntax

    The correct syntax is alias name='command' without spaces around the equal sign.
  2. Step 2: Match options to syntax

    alias gs='git status' matches exactly: alias gs='git status'. Others have spaces or wrong punctuation.
  3. Final Answer:

    alias gs='git status' -> Option B
  4. Quick Check:

    Correct alias syntax = B [OK]
Quick Trick: No spaces around = and use single quotes for commands [OK]
Common Mistakes:
  • Adding spaces around equal sign
  • Using colons or other punctuation instead of =
  • Putting quotes around alias name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes