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 edited the .profile file to add a new PATH. I believe I set it wrong such that most commands become unavailable. Since I can't use ls or vi commands to edit .profile again, any idea how I can correct the error? Thanks!

share|improve this question

migrated from stackoverflow.com Jun 18 '10 at 8:10

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

add comment

3 Answers 3

up vote 3 down vote accepted

This seems more like a superuser.com question. Anyway, I would try to fix it by using the full path of vi to edit your .profile.

/usr/bin/vi /home/username/.profile
share|improve this answer
add comment

You can search for vi executable and run it directly. It is usually /usr/bin/vi

share|improve this answer
add comment

You can also rename the .profile and relogon to get defaults back.

share|improve this answer
add comment

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.