Bash notes

Difference between .bashrc and .bash_profile

  • Linux - .bashrc is available by default.
  • Mac - .bash_profile is available by default.

According to the bash man page:

  • .bashrc - the individual per-interactive-shell startup file
  • .bash_profile - the personal initialization file, executed for login shells

So the difference is:

  • .bashrc - executed for interactive non-login shells
  • .bash_profile - executed for login shells
Source

© 2020 | Paul Kim