exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 63 discussion

Actual exam question from CompTIA's XK0-005
Question #: 63
Topic #: 1
[All XK0-005 Questions]

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?

  • A. source ~/.bashrc
  • B. read ~/.bashrc
  • C. touch ~/.bashrc
  • D. echo ~/.bashrc
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 8 months, 4 weeks ago
A. source ~/.bashrc The source command is used to re-read a shell configuration file and make its changes effective immediately in the current shell session. In this case, the administrator made changes to the ~/.bashrc file and added an alias command, but the alias is not working. To make the changes in the ~/.bashrc file effective, the administrator should run the following command: source ~/.bashrc his will cause the shell to re-read the ~/.bashrc file and apply the changes, including the new alias. After running this command, the administrator should be able to use the alias as expected. Option B is incorrect because the read command is used to read input from the user, not to re-read a configuration file. Option C is incorrect because the touch command is used to update the modification time of a file, not to re-read a configuration file. Option D is incorrect because the echo command is used to display text on the screen, not to re-read a configuration file.
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago