LPI
202-400 · Question #95
When bash is invoked as an interactive login shell, which of the following sentences is true?
The correct answer is C. It reads and executes commands in ~/.bashrc only if /etc/profile or another initialization script. 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/profile and then does same for ~/.bash_profile
- BIt first reads and executes commands in /etc/bashrc and then does same for /etc/profile
- CIt reads and executes commands in ~/.bashrc only if /etc/profile or another initialization script
- DIt ignores /etc/profile and only reads and executes commands in ~/.bashrc
- EIt first reads and executes commands in /etc/profile and then does same for ~/.bash_profile,
How the community answered
(60 responses)- A3% (2)
- B12% (7)
- C78% (47)
- D2% (1)
- E5% (3)
Community Discussion
No community discussion yet for this question.