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.

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