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

  • 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

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 .