Question: What's the difference between `.bashrc` and `.bash_profile` and which one should I use?

Answer: 
From this [short article](http://joshstaiger.org/archives/2005/07/bash_profile_vs.html)

> 
> According to the bash man page,
>  .bash\_profile is executed for login
>  shells, while .bashrc is executed for
>  interactive non-login shells.
> 
> 
> **What is a login or non-login shell?**
> 
> 
> When you login (eg: type username and
>  password) via console, either
>  physically sitting at the machine when
>  booting, or remotely via ssh:
>  .bash\_profile is executed to configure
>  things before the initial command
>  prompt.
> 
> 
> But, if you've already logged into
>  your machine and open a new terminal
>  window (xterm) inside Gnome or KDE,
>  then .bashrc is executed before the
>  window command prompt. .bashrc is also
>  run when you start a new bash instance
>  by typing /bin/bash in a terminal.
> 
> 
>
**A BETTER COMMENT FOR THE HEAD OF /ETC/PROFILE**

Building on Flimm's great answer above, I inserted this new comment at the head of my Debian `/etc/profile`, *(you might need to adjust it for your distro.)*:

```
# For BASH: Read down the appropriate column. Executes A, then B, then C, etc.
# The B1, B2, B3 means it executes only the first of those files found.  (A)
# or (B2) means it is normally sourced by (read by and included in) the
# primary file, in this case A or B2.
#
# +---------------------------------+-------+-----+------------+
# |                                 | Interactive | non-Inter. |
# +---------------------------------+-------+-----+------------+
# |                                 | login |    non-login     |
# +---------------------------------+-------+-----+------------+
# |                                 |       |     |            |
# |   ALL USERS:                    |       |     |            |
# +---------------------------------+-------+-----+------------+
# |BASH_ENV                         |       |     |     A      | not interactive or login
# |                                 |       |     |            |
# +---------------------------------+-------+-----+------------+
# |/etc/profile                     |   A   |     |            | set PATH & PS1, & call following:
# +---------------------------------+-------+-----+------------+
# |/etc/bash.bashrc                 |  (A)  |  A  |            | Better PS1 + command-not-found 
# +---------------------------------+-------+-----+------------+
# |/etc/profile.d/bash_completion.sh|  (A)  |     |            |
# +---------------------------------+-------+-----+------------+
# |/etc/profile.d/vte-2.91.sh       |  (A)  |     |            | Virt. Terminal Emulator
# |/etc/profile.d/vte.sh            |  (A)  |     |            |
# +---------------------------------+-------+-----+------------+
# |                                 |       |     |            |
# |   A SPECIFIC USER:              |       |     |            |
# +---------------------------------+-------+-----+------------+
# |~/.bash_profile    (bash only)   |   B1  |     |            | (doesn't currently exist) 
# +---------------------------------+-------+-----+------------+
# |~/.bash_login      (bash only)   |   B2  |     |            | (didn't exist) **
# +---------------------------------+-------+-----+------------+
# |~/.profile         (all shells)  |   B3  |     |            | (doesn't currently exist)
# +---------------------------------+-------+-----+------------+
# |~/.bashrc          (bash only)   |  (B2) |  B  |            | colorizes bash: su=red, other_users=green
# +---------------------------------+-------+-----+------------+
# |                                 |       |     |            |
# +---------------------------------+-------+-----+------------+
# |~/.bash_logout                   |    C  |     |            |
# +---------------------------------+-------+-----+------------+
#
# ** (sources !/.bashrc to colorize login, for when booting into non-gui)

```

And this note at the head of each of the other setup files to refer to it:

```
# TIP: SEE TABLE in /etc/profile of BASH SETUP FILES AND THEIR LOAD SEQUENCE

```

Worth noting I think is that Debian's `/etc/profile` by default sources (includes) `/etc/bash.bashrc`, (that's when `/etc/bash.bashrc` exists). So login scripts read both `/etc` files, while non-login reads only bash.bashrc.

Also of note is that `/etc/bash.bashrc` is set to do nothing when it's not run interactively. So these two files are only for interactive scripts.