How to permanently reset my $PATH?
Solution 1:
You obviously have a malformatted line somewhere in one of your shell configuration files that are read when the Terminal starts Bash. This is either .profile
or .bash_profile
, depending on which you used. In OS X, .bashrc
isn't read unless you've explicitly sourced it from one of these other files.
To be able to use the commands without setting a $PATH
, simply call them by their full location.
If you know that there's nothing else in the files you need, delete them:
/bin/rm ~/.bash_profile
/bin/rm ~/.profile
If not, open them in TextEdit, for example, and remove the offending lines with PATH=
:
/usr/bin/open -a TextEdit ~/.bash_profile
/usr/bin/open -a TextEdit ~/.profile
If you'd like to use a command line editor, you can do that as well:
/usr/bin/vim ~/.bash_profile
/usr/bin/nano ~/.bash_profile
# et cetera