What does the alias command do in UNIX?

What does the alias command do in UNIX?

a) Creates shortcuts for commands
b) Changes file ownership
c) Removes files
d) Renames files

Answer:

a) Creates shortcuts for commands

Explanation:

The alias command in UNIX is used to create shortcuts or custom names for frequently used commands. This allows users to type shorter or simpler commands instead of long or complex ones. The alias persists for the duration of the session unless saved in a configuration file.

For example, running alias ll='ls -la' allows you to use the shortcut ll instead of typing the full ls -la command each time. This improves efficiency and reduces the likelihood of typing errors for frequently used commands.

Understanding how to use alias is a valuable skill for enhancing productivity in UNIX. It allows users to customize their environment and streamline their workflow, making it easier to execute common tasks quickly.

Reference:

Top 50 Unix MCQ Questions & Answers

Scroll to Top