Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tryied to set the JAVA_HOME environmet variable in the ~/.profile file and I made a mistake


the error is in the PATH referencing. I put PATH rather than $PATH. this prevents me from login.

I tried to edit the file using the recovery mode but it says that the file system is read only. so any suggestions how to deal with this issue.


share|improve this question

2 Answers 2

up vote 0 down vote accepted

Log in as another user that can sudo, or failing that start back up in resuce more, then before you edit the file remount the partition read write

mount / -o remount -w should work just fine.

Take a look at this question for more information on remounting.

share|improve this answer
Also X doesn't run .profile (I think) and you can start another shell via ssh or use sftp to rename/edit the file is ssh is enabled. –  coteyr Nov 15 '12 at 23:58

Boot a live CD, mount the partition and edit the file (use sudo if you have to -- no password required).

share|improve this answer

Your Answer


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.