PrepAway - Latest Free Exam Questions & Answers

Which of the following tools should you use to accomplish the task?

You work as the Network Technician for Tech Perfect Inc. The company has a Linux-based
network.
You are working as a root user on the Linux operating system. You want to create an alias such
that when you type c, the system should run the clear command to clear the screen. Which of the
following tools should you use to accomplish the task?

PrepAway - Latest Free Exam Questions & Answers

A.
alias clear

B.
alias clear= c

C.
alias c

D.
alias c= ‘clear’

Explanation:

When a user types alias c= ‘clear’ on the command prompt and presses Enter this will create an
alias for the clear command. After creating the alias whenever a user wants to clear the screen, he
just needs to type c and then press Enter.
This action will clear the screen. This alias will be lost if a user logs out and logs in again.
What is the alias command?
The alias command is a shortcut name for longer commands. If a command is run often, but it
takes a considerable amount of time in typing that command, the time can be reduced by using
the alias command.
For example: # alias list= ‘ls-la’
This will create an alias called list, which will use the ls command to print a long-style listing of all
files in the current directory (the -l gives a long-style list, and the -a shows all files -including
hidden files).
Answer options B, C, and A are incorrect. These are incorrect commands and will show error
messages on the command prompt.


Leave a Reply