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.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications