Multiple choice technology operating systems

After “alias dir=ls”, then when you use dir at command line, what will happen?

  1. No effect

  2. Error

  3. Show “ls”

  4. Run “ls”

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The alias command creates a command shortcut - typing 'dir' substitutes 'ls'. When you enter 'dir' at the shell prompt, the shell expands it to 'ls' and executes the ls command, listing directory contents exactly as if you had typed 'ls' directly with any arguments.