CompTIA Linux+ (XK0-005) — Question 127
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?
Answer options
- A. source ~/.bashrc
- B. read ~/.bashrc
- C. touch ~/.bashrc
- D. echo ~/.bashrc
Correct answer: A
Explanation
The correct answer is A, as executing 'source ~/.bashrc' will refresh the current shell session with the updated configurations, enabling the newly added alias. The other options do not execute the changes; 'read' and 'echo' simply display the file content, while 'touch' updates the file's timestamp without applying any changes.