Shell environment · Question 11 of 12
A user logs in via ssh. The home directory contains only ~/.profile and ~/.bashrc. Which files does bash read on its own, without being included by other files? (2 correct answers)
2 answers are correct. Hard Created with AI
Show answer
Answer
- B ~/.profile
- C /etc/profile
Explanation
A login shell reads /etc/profile and the first existing file of ~/.bash_profile, ~/.bash_login and ~/.profile. ~/.bashrc is only added if ~/.profile includes it itself, ~/.bash_logout only runs at logout.