The suggested answer of removing .bash_profile is not a good idea in general. There are other things that can be set in that file besides PATH definitions.

If you want to undo the effects of your experimentation, just remove or comment out that PATH line with a #.

You don’t want to edit the PATH from scratch, but append to it, as you did with your second line. The preferred method of adding something to your path would be:

export PATH=$PATH:$HOME/bin

EDIT Since your PATH is messed up, you don’t have access to the usual commands to make these changes. As a temporary fix, you can define a new minimal path in a Terminal window (not in your .bash_profile) by typing:


This will temporarily give you access to nano ls mv vi cat and rm — the basic tools to check and edit your .bash_profile and fix your problem…

Repeat, do not put this PATH definition anywhere except for the duration of the session while you make your fixes.