Bird
0
0

Which of the following is the correct syntax to create an alias named ll for ls -l in your shell setup?

easy📝 Syntax Q12 of 15
Linux CLI - Environment and Configuration
Which of the following is the correct syntax to create an alias named ll for ls -l in your shell setup?
Aalias ll='ls -l'
Bexport ll='ls -l'
Calias ll=ls -l
Dset alias ll='ls -l'
Step-by-Step Solution
Solution:
  1. Step 1: Recall alias syntax

    The correct way to create an alias is using the keyword alias followed by the name, an equals sign, and the command in single quotes.
  2. Step 2: Check each option

    alias ll='ls -l' matches the correct syntax. export ll='ls -l' uses export which is for variables, not aliases. alias ll=ls -l misses quotes, causing syntax errors. set alias ll='ls -l' uses an invalid command.
  3. Final Answer:

    alias ll='ls -l' -> Option A
  4. Quick Check:

    Alias syntax = alias name='command' [OK]
Quick Trick: Use alias name='command' with quotes for shortcuts [OK]
Common Mistakes:
  • Using export instead of alias
  • Omitting quotes around the command
  • Using invalid commands like set alias

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes