How do I restore my .bash_profile?
If your terminal window is still open, you can save the current environment settings to rebuild.  The recovered file will contain more information than you may have defined yourself, so remove the parts you don't need:

Defined vars and functions:

$ declare &gt; .bash_profile.recovered


Aliases:

$ alias &gt;&gt; .bash_profile.recovered