Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have mis-configured ~/.profile while adding new enviroment variable now i want to restore my original .profile for my macOS, i am not mac expert please help me. None of my shell command is working for me like ls, java, php etc Please help

share|improve this question

migrated from Sep 9 '11 at 17:38

This question came from our site for professional and enthusiast programmers.

Try – Johnsyweb Sep 9 '11 at 7:54
Restore from a backup. – Abizern Sep 9 '11 at 7:55
how i will restore from backup i am new to mac please if you can help me. – Muhammad Irfan Sep 9 '11 at 8:21

There is no "original" .profile on OS X (i.e. by default it doesn't exist). If you don't have a backup, probably the easiest thing to do is rename the .profile so it doesn't cause trouble. Then, if you want, you can try to figure out what's wrong with it, edit it to fix the problem, and reinstall it (you probably have a bad assignment to PATH, from what you describe). To rename it, use:

/bin/mv ~/.profile profile-disabled.txt

(note that using /bin/mv instead of just mv will work even if your PATH is completely messed up.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .