Where is .bashrc file found in Linux?

  • I am not finding my .bash_login and .bash_profile

    [email protected]:~# locate .bash*
    [email protected]:~# 

    Is there always only one .bashrc and .bash_profile file for every user?

    And, is .bashrc and .bash_profile always found in the /home/"user name" directory?

  • The only ones that bash looks at by default are in the user's home directory, yes. There is also typically a single source for them in Linux -- /etc/skel. The user's home directory does not need to be under /home, though.

    I see you've edited your question to ask where your .bash_login and .bash_profile files are. Based on the # prompt, I'm going to assume you're running this as root. In that case, your files are


    See my original answer above regarding a user's home directory -- it's not always /home; in this case, root's home directory is /root.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM