Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Sep 9 '11 at 17:38

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

    
Try apple.stackexchange.com –  Johnsyweb Sep 9 '11 at 7:54
1  
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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