Bird
0
0

Which command correctly creates an alias named update to run sudo apt update?

easy📝 Conceptual Q2 of 15
Linux CLI - Environment and Configuration
Which command correctly creates an alias named update to run sudo apt update?
Aalias update='sudo apt update'
Balias update=sudo apt update
Calias 'update' = 'sudo apt update'
Dalias update:='sudo apt update'
Step-by-Step Solution
Solution:
  1. Step 1: Recall alias syntax

    The correct syntax is alias name='command' with no spaces around = and command in quotes.
  2. Step 2: Check options for correct syntax

    Only alias update='sudo apt update' matches this syntax exactly.
  3. Final Answer:

    alias update='sudo apt update' -> Option A
  4. Quick Check:

    Alias syntax = alias name='command' [OK]
Quick Trick: Use quotes and no spaces around = for alias [OK]
Common Mistakes:
  • Leaving out quotes
  • Adding spaces around =
  • Using wrong symbols like :=

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes