I am a Ubuntu newbie. I am running Ubuntu 16.04. Until yesterday my computer was fine. But today it got stuck in a login loop. I enter my username and password, it lets me to log in, but after a few seconds, it goes back to the log in screen. It keeps repeating forever. I went through the Ubuntu forums. They have suggested to login using Ctrl+Alt+f1 and then run mv .Xauthority Xauthority.backup. The problem is when I executed Ctrl+Alt+f1, a progress bar is shown forever and it never opens the terminal. I am not sure what to do next. Any help is greatly appreciated.


  • The most common reason I've had for login-loop is a lack of space in $HOME, as the GUI requires temporary work files to be created, and login will fair (ie. you're logged out without message) if insufficient space exists in $HOME to create said files). I don't follow the progress-bar though; are you able to login via text terminal? Did you check you have disk space etc? ($HOME refers to /home/$USER where $USER is your user id)
    – guiverc
    Mar 10, 2020 at 2:43
  • The Ctrl+Alt+f1 also stuck in an infinite loop. It never opened the terminal.
    – Massey
    Mar 10, 2020 at 2:49
  • Did you try another combination, eg. I usually opt for Ctrl+Alt+F4, F3 etc as I've too had issues where ctrl+alt+F1 & f7 don't do what you expect them to (f1 becomes f2, f7 becomes f8)
    – guiverc
    Mar 10, 2020 at 2:52
  • I tried all the combinations but no luck!
    – Massey
    Mar 10, 2020 at 12:13
  • Boot to Recovery Mode from the GRUB menu. Get to the root # prompt and type sudo ls -al /home/your_username/.*thority. Edit that output into your question. Start comments to me with @heynnema or I may miss them.
    – heynnema
    Mar 10, 2020 at 22:23

1 Answer 1


If you still cannot bring up a terminal even with ctrl+alt+f1, it would be worth preparing a Live USB if you have access to another computer, booting from that, and checking that there is enough space, as @guiverc suggests.

Once you boot off the live USB, or manage to boot into a command line, use

sudo blkid

To find out the layout of your disks. Once you identify a likely suspect, for example /dev/sda, you can mount it using:

sudo mount /dev/sda /mnt

Once it's mounted, take a peek inside it to see which drive it is, and use:

df -h

To see what the capacity of the drive is (it will be the one that it says is mounted in /mnt).

Work your way though your drives/partitions until you see whether one of them (as @guiverc says, probably the one housing your /home folder, is full.

If you know which drive you home folder is in, go ahead and mount it as above, using the actual drive name, and use df -h to see whether it's full.

If they are, make space by clearing your caches. They usually are in .cache. The contents of this folder are safe to remove.

  • There is enough space. During one of the login loops, I have managed to check the hard drive. It has used 200 GB and 700 GB is free.
    – Massey
    Mar 10, 2020 at 12:15
  • Yes, but how is your system laid out? Is the whole disk one ext4 partition or do you have multiples? Do you use LVM for a separate /home volume?
    – Kurankat
    Mar 10, 2020 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.