CompTIA
LX0-101 · Question #234
When bash is invoked as an interactive login shell, which of the following sentences is true?
The correct answer is A. It first reads and executes commands in /etc/bashrc and then does the same for /etc/profile. See the full explanation below for the reasoning.
Question
When bash is invoked as an interactive login shell, which of the following sentences is true?
Options
- AIt first reads and executes commands in /etc/bashrc and then does the same for /etc/profile.
- BIt ignores /etc/profile and only reads and executes commands in ~/.bashrc.
- CIt first reads and executes commands in /etc/profile and then does the same for
- DIt first reads and executes commands in /etc/profile and then does same for ~/.bash_profile
- EIt reads and executes commands in ~/.bashrc only if /etc/profile or another initialisation script
How the community answered
(27 responses)- A81% (22)
- B11% (3)
- C4% (1)
- D4% (1)
Community Discussion
No community discussion yet for this question.