Ubuntu 20.04 LTS Focal Fossa is the latest Linux distro from Ubuntu developers with Long term support for Server and Desktop. Recently, I have started using it but later, after a few updates and upgrade, I got a problem, it stuck on login screen in the loop. Even I was entering the right password but it didn’t let me log in my Desktop. Thus, again and again, I end up with Ubuntu 20.04 Login screen which was frustrated.
If you are facing the same problem, recently and want to break the loop, then here is the common thing which I have done and want to share with you the same.
On Login screen of Ubuntu 20.04 where I have been stuck for some time, I simply switch to get command mode. For that press, CTRL+ALT+F3, this will drop you on the command line interface with login option.
However, to exit Command line, you can use keyboard shortcut that is CTRL+ALT+F2, to get back the Graphical User Interface.
Enter your Ubuntu user name along with the password which you are using so far. Now, simply first update and then run upgrade command:
sudo apt update
sudo apt upgrade
Finally, reboot the system with:
Now, this time when you try to login Ubuntu 20.04, you will be able to, successfully. I had tried it on Focal fossa but surely you can do it with previous Ubtunu 19.10 or 18.04 LTS if you have similar kind of problem there.
Nevertheless, if you have tried out this method and didn’t work, then eventually you have hit and tried some other solutions. Thus, please let us know which one worked successfully for you in the comment section, it will help others tremendously… Thanks.
15 Best Linux Based OS for Raspberry Pi
Rufus for linux? Not available, Use these best alternatives
How to install Anaconda on WSL Windows 10/11 using Ubuntu Linux App
10 Top Most Beautiful Linux Distros or Operating systems
How to install Adminer on Windows 10 or 11?
How to install Nextcloud server on Windows 10
30 thoughts on “Ubuntu 20.04 LTS stuck login loop: General Solution”
I had the same problem, but in my case, it was simply because the user files were not owned by the user (confusion between 2 previously existing users).
ctrl + alt + F2 to enter into the terminal
sudo chown -R [user]:[user] /home/[user]
This worked for me after creating the home directory.
sudo mkdir /home/[user]
sudo chown -R [user]:[user] /home/[user]
Rebooted and login worked.
Thus worked for me thanx
this fix did not work for me
Did not work for mert too.
It did not work either.
sudo apt-get purge chrome-remote-desktop
thank you, I forgot about the chrome remote desktop
Removing chrome-remote-desktop worked great for me. Since there was no way to get a console, I had to use a USB installation key and this procedure to mount my OS properly before uninstalling the chrome-remote-desktop package.
Oh thank you that was my issue too. I reinstalled ubuntu twice and kept having the same login loop. The chrome remote desktop which I use was the culprit.
Yup … purging chrome remote desktop worked for me. Thanks so much.
Kudo’s for Pierre.
Your solution worked for me, thanks a lot!
Thank you pRose, removing chrome Remote Desktop fixed my login loop
My solution was similar to Pierre’s: the user files had been renamed erroneously in a mount-process by Windows in a dual boot system. Renaming them worked for me, thanks
Yup! Remote Desktop! Thanks!
Remove Chrome Remote Desktop, saved my life 🙂
I just had a similar issue, with a clean install except I also couldn’t log in via the terminal.
Turns out when I set up the password during installation, it was assuming a US keyboard, even though I selected UK. The password I thought I typed has a ” character but it was stored with a @ (these characters are swapped between UK and US keyboards)
Once installed, it was set up for UK keyboard, so although I was typing the same keys, it was using the wrong characters! I could log in by typing a @ instead of the “
Chrome-remote-desktop worked well for me also. Could you recommend any remote desktop solution instead?
Thanks! Worked after updating led to the same problem.
@Rheinhold: What files did you rename? I’m using a dual boot Windows/Linux setup as well. The upgrade from 18.04 to 20.04 seemed to go well at first, but after the next boot I’m now stuck in the login loop. None of the other suggestions have worked for me so far…
I ve tried ctrl+alt+f3 and it just says wrong login. I m sure of the passworf because I’ve used it to install some updates right after installing ubuntu 20.04. 01 it s the first time I login after installation. Any idea of what’s going on?
hello David I ve the same probleme, did you fixed it, now?
Thank you. Able to login now.
Your suggestion unblocked me. The OS now comes up.
when i run sudo apt upgrade i got an error : Not enough space in /var/cache/apt/archives/
i then run:
sudo apt-get autoremove
sudo apt-get autoclean
and rebooted. worked fine, but i still get wornings about not having much diskspace left, and i assume that causes all the problems. >>lack of diskspace<<
Thanks Akni. I tried just about everything and then saw your comment and thought why not. And it has worked. I am finally able to login. Thank you.
Excellent article ,yeah it worked in my case
Thanks a lot! This resolved my issue! Why didn’t I think of such a simple answer, I had just upgraded to 20.04 so the obvious way to resolve would be to just update.
This saved my day! Thanks again! 🙂
My loop hell go away after:
ls -lah | grep -i Xauthority
sudo chown username:username .Xauthority
replace username by your login name
I’ve installed java yesterday night and in morning my ubuntu 20.04 LTS got in login loop. So this method helps me to login. Thanks mate.