Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
33
rated 0 times [  33] [ 0]  / answers: 1 / hits: 23846  / 1 Year ago, mon, january 30, 2023, 5:23:55

I have been playing around with the ~/.profile file trying to add something permanently to my $PATH variable and it seems i have done some damage.



I can't log into ubuntu now. When I enter my password the screen goes black for 1 second and then it goes back to the login screen. If I press Ctrl+Alt+F3 I can log in with the command line. My question is how can I edit ~/.profile from the command line so I can log in again ?


More From » .profile

 Answers
1

You can edit the file using



nano ~/.profile


To get the default ~/.profile back use



cp /etc/skel/.profile ~/.profile


As this will overwrite your modified version you may want to save your version first:



cp ~/.profile ~/.profile.invalid

[#28272] Tuesday, January 31, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atetamme

Total Points: 11
Total Questions: 121
Total Answers: 109

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;