Shell environment · Question 9 of 12
The home directory contains ~/.bash_profile and ~/.profile. Which of them does a login shell read?
1 answer is correct. Medium Created with AI
Show answer
Answer
- B Only ~/.bash_profile, the first file found
Explanation
bash looks for ~/.bash_profile, ~/.bash_login and ~/.profile in this order and reads only the first one that exists. ~/.profile is ignored here.