I wanted to have
/usr/local/bin to be listed before
/usr/bin in my
PATH environment variable.
One way to achieve this would be to add a
~/.profile file with a line like this:
This would result in
/usr/local/bin being listed twice. It wouldn’t hurt but it’s not pretty either.
If you look at
/etc/profile, you will see that the initial value of
PATH is set by
The right way to change the order of default paths is to edit
/etc/paths. It contains one path per line, in descending order. Mine looks like this: