bashrc vs. bash_profile

.bash_profile vs .bashrc
What’s the difference between .bashrc, .bash_profile, and .environment?

FreeBSD:

$ strings /usr/local/bin/bash | grep profile
noprofile
/etc/profile
~/.profile
~/.bash_profile

$ strings /usr/local/bin/bash | grep bashrc
~/.bashrc
if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    if [ -f /usr/local/etc/bash.bashrc ]; then
      . /usr/local/etc/bash.bashrc
    fi
  fi
fi

see also here

blog.bachi.net: Interactive vs. Login Shell

1 thought on “bashrc vs. bash_profile

  1. Pingback: Interactive vs. Login Shell | Andreas' Blog

Leave a Reply

Your email address will not be published. Required fields are marked *