I made some mistake in my .profile during adding some path, now I can't login into my account. All i can do is enter terminal ctrl+alt+f3 and login there. How can I edit from there this file and make everything back to niemal?
1 Answer
There are CLI editors available in Ubuntu:
If you're unable to simply call nano or vi you can try with absolute paths:
/bin/nano .profile
or
/usr/bin/vi .profile
And if you want to bring the default .profile back you can use the template from /etc/skel/.profile
/bin/cp /etc/skel/.profile /home/yourname/.profile
using vi editor
vi
,vim
,ed
,nano
. You will have to read theman
page first. Or see if the editor you used left a backup file~/.profile~
.