This question already has an answer here:

Actually I had updated. profile file with export PATH for mongo DB and to reflect changes had to restart the machine. After restart I caught in an unending login loop. Ubuntu is not allowing me to login even after entering correct password. So then I tried to login via shell . Pressed ctrl +alt +F3. Then shell appeared. Now login to my user. Then ran a command ~/.xsession-errors It seems there is some issue with. bash, therefore thinking to remove export path from. profile file. But I am not sure how to edit. profile from shell. I am quite new to ubuntu. Request you to please help me.

marked as duplicate by earthmeLon, steeldriver bash May 29 at 15:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I tried following command after logging in shell--- /usr/bin/vi .profile. Then edited the. profile text. Now I am not sure how to save updated .profile file. – Deepak May 31 at 2:53

Browse other questions tagged or ask your own question.