`brew doctor` gives warning for newly opened terminal windows When I run brew doctor I get this warning:

Warning: /usr/bin occurs before /usr/local/bin

TONS of people with the same problem, but they solve it by running this:

PATH="/usr/local/bin:$PATH"

Which fixes it once, but upon closing the terminal windows and opening a new one and running brew doctor, the warning re-appears.

Is there a permanent fix for this?
Edit your PATH variable in your ~/.profile (assuming you have not changed your default login shell).
There should be something like this:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


change it so that /usr/local/bin in before /usr/bin.

If you do not have a ~/.profile (or it is empty) type the following:

echo 'export PATH=$PATH' &gt;&gt; ~/.profile,


Make certain that you use &gt;&gt; instead of one &gt;. 

Now edit the ~/.profile like described before.