How to Fix the Ubuntu Login Loop

Advertisements

A number of Linux Ubuntu users have encountered a certain irksome issue when trying to log into the system. The operating system tends to get tenaciously stuck in a never-ending login loop. A chunk of users has complained that seeing the same login screen repeatedly whenever they are switching on their Ubuntu PC.

Now, this login loop is seriously one of the most frustrating issues faced by any user. However, if you are one of those people facing this problem, don’t worry. In our all-new guide here, we will show you how to fix the login loop issue in Ubuntu.

How to Fix the Ubuntu Login Loop

How to Fix the Ubuntu Login Loop

It is easy enough to rectify the login loop issue in Ubuntu if you follow the procedure given below.

Advertisements

Fix 1: Use Shell

First of all, just boot up Ubuntu like usual. When the login screen comes up, though, instead of signing in, proceed to press Ctrl+Alt+F3 on the keyboard. Ubuntu should now exit the GUI login screen and enter a Terminal prompt mode. You will be prompted to enter your username and password eventually. Do so, and then enter the commands given below:

sudo apt update
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
sudo apt-get -y clean
reboot

Once these commands have been executed, you should be able to log into Ubuntu without any issues. If you want to exit the Command line, you can press Ctrl+Alt+F2 on your keyboard. This will take you to the GUI screen.

Fix 2: Xauthority

Another way of fixing the login loop issue in Ubuntu is to alter the permissions of Xauthority. For that, proceed to run the given command first:

ls -lah | grep -i Xauthority
sudo chown username:username .Xauthority

After this, proceed to press Ctrl+Alt+F7 on your keyboard. This will take you back to the usual login screen. Proceed to sign into Ubuntu. In case this fails to fix the issue, keep reading for more solutions.

Advertisements

Fix 3: Check Tmp Folder

Occasionally, the reason behind the login loop problem in Ubuntu lies in the “/tmp” folder. In that case, altering “/tmp” permissions can fix the issue. You simply need to log into the terminal once more and enter the following command:

sudo ls -lah /tmp

If you see something like “drwxrwxrwt,” you have been successful. Otherwise, you must reset permission by using the chmod command given below.

sudo chmod 1777 /tmp

In case this fails to work as well, return to the terminal by pressing Ctrl+Alt+F3. Sign in and enter the command given below.

Advertisements
sudo apt-get -y install lxdm

In case lxdm has not been selected, do it first by using the Up and Down arrow key. Now hit the Enter key and then proceed to reboot by using the command sudo reboot.

That is it for now. We hope this guide will surely help you to fix the login loop issue in Ubuntu. Now, check out our Windows Guides, Gaming Guides, Social Media Guides, iPhone, and Android Guides to know more. If you have any queries, comment down with your name & email ID. Moreover, subscribe to our very own YouTube Channel in order to watch awesome videos on gaming and smartphone tips and tricks.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.