nerdexam
CompTIACompTIA

XK0-005 · Question #549

XK0-005 Question #549: Real Exam Question with Answer & Explanation

The correct answer is A: source ~/.bashrc. The command source ~/.bashrc should be executed first to use the alias command. The source command reads and executes commands from a file in the current shell environment. The ~/.bashrc file is a configuration file that contains commands and aliases that are executed when a new

System Management

Question

A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work. Which of the following should be executed FIRST?

Options

  • Asource ~/.bashrc
  • Bread ~/.bashrc
  • Ctouch ~/.bashrc
  • Decho ~/.bashrc

Explanation

The command source ~/.bashrc should be executed first to use the alias command. The source command reads and executes commands from a file in the current shell environment. The ~/.bashrc file is a configuration file that contains commands and aliases that are executed when a new bash shell is started. The administrator made some changes in the ~/.bashrc file and added an alias command, but the changes are not effective until the file is sourced or a new shell is started. The command source ~/.bashrc will reload the file and make the alias command

Topics

#Bash Shell#Shell Configuration#Aliases#Command Line

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions