XK0-005 · Question #549
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…
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…
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
How the community answered
(27 responses)- A93% (25)
- B4% (1)
- C4% (1)
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
Community Discussion
No community discussion yet for this question.