0

Currently learning how to use Linux, and recently got introduced to $PATH.

Upon checking out the $PATH on my mac I found a few paths that I think shouldn't be there in the first place.

Here's what I got:

/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin://anaconda/bin://anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I had downloaded Anaconda a few weeks ago but decided to uninstall it. Is it safe for me to delete those paths?

Any good practices I should know before fooling around with this?

Thanks.

1

Yes, if you no longer use Anaconda, there is no reason for that in your $PATH. In other words, it is safe to remove.

Any good practices I should know before fooling around with this?

Well, it might be good to save your default path somewhere, if you should somehow mess it up!
Just checking in on a machine running OS X 10.11, with nothing modified, the default path is:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

If you want to alter the path, you could put it in your $HOME/.profile. I have this on another OS X machine's $HOME/.profile:

PATH=$PATH:/Users/maulinglawns/bin
export PATH

And the $PATH here is:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/maulinglawns/bin

The bin directory in my "home" under this machine is where I keep my own scripts and applications, so it makes sense to add it to the $PATH.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.