1

This question already has an answer here:

So I accidentally run in terminal command export PATH="/usr/bin/php/bin" which override my defaults and none of the commands aren't responding.

MacBook-Pro-Kil:home $ sudo
-bash: sudo: command not found

Is it possible somehow restore it? My system is 10.9.5

marked as duplicate by Dan J, grg, nohillside Jun 24 '15 at 20:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Your path is bind to your session. Open a new terminal window and you should be good to go. – CousinCocaine Jun 24 '15 at 20:31
1

Assuming you’re not willing to give up your active terminal session, try to bootstrap your settings like this:

export PATH=/bin:/usr/bin:/usr/local/bin; source ~/.bash_profile

The part that says export PATH=… is there to bootstrap an environment for ~/.bash_profile, which might itself rely on one or more of the paths given.

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