LPI
201-450 · Question #121
When bash is invoked as an interactive login shell, which of the following sentences is true?
The correct answer is C. It first reads and executes commands in /etc/profile and then does the same for. See the full explanation below for the reasoning.
203 System Startup
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
(33 responses)- B3% (1)
- C85% (28)
- D9% (3)
- E3% (1)
Topics
#bash initialization#login shell#/etc/profile#shell startup files
Community Discussion
No community discussion yet for this question.