Skip to main content

Mac Path Variables

Ok, I admit it. I was a Microsoft user for a number of years. Phew, it feels so good to let that out. It wasn't all bad however. Microsoft keyboard shortcuts are much better than Mac. So was changing PATH and environment variables. When I first had to do it on a mac I was like wwoooaaahh? And whheeerree? And whyyy does it keep getting reset? #ffs

The first way I modified the PATH was directly in the terminal using something like this:

export PATH=$PATH:/usr/local/share/npm/bin

But that has limitations as sometimes things don't persist.

A much better way is setting the Bash Profile so it will load the next time you restart:

vim ~/.bash_profile

and use something like this:

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