• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How to Fix the Ubuntu Login Loop Problem

How to Fix the Ubuntu Login Loop Problem

By Sourabh / September 19, 2020 Category: How To, Ubuntu

What to do when Linux Ubuntu gets stuck in a login loop. Here is how to fix the Ubuntu login loop. This is a common issue faced by many Ubuntu users during login. Let us see how to fix this.

How to Fix the Ubuntu Login Loop

Simply start Ubuntu like you normally do. When you see the login screen, don’t sign in. Instead, press Ctrl + Alt+F3 on your keyboard.

NOTE: Ubuntu will drop out of the GUI login screen and into a Terminal mode.

Enter your username in the terminal prompt and enter the password when asked. Now, run the following commands:


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

After executing the commands you will be able to login into Ubuntu successfully.

NOTE: To exit Command line, you can use keyboard shortcut that is CTRL+ALT+F2, to get back the Graphical User Interface.

Method 2 Change the Permissions of Xauthority

Run the command:


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

Now press Ctrl + Alt + F7 to return to your normal login screen. Simply Log in to Ubuntu.

If that didn’t work try the other methods.

Method 3 Change “/tmp” permissions

Sometimes the “/tmp” folder also causes the issue. So to fix this, log in to the terminal again and run:


sudo ls -lah /tmp

If it looks like “drwxrwxrwt,” you’re all okay. If not, you will have to reset the permission uding chmod command.


sudo chmod 1777 /tmp

If this also does not work, go back to terminal (Ctrl+ALT+F3), login, and enter the following command:


sudo apt-get -y install lxdm

If lxdm is not selected, select it by using the UP and DOWN arrow keys and press ENTER. Then reboot using the command sudo reboot.

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap