DId You Forgot You Linux Username, Here

If you can not even log in because you cannot remember your username, there is still a way to recover your data. Note that this guide assumes you’re the only user on the system.

  1. Boot the system into Recovery Mode through GRUB.
  2. Select the Root Shell option.
  3. Type in this command into the terminal window that opens:
  4. Your username will be at the very beginning of the line on one of the returned lines. Typically there will only be one, but there may be more depending on your system.
  5. Reboot into normal mode and use the username specified.

If you are not the only user, replace the code on step 3. Look for a user with an ID greater than or equal to 1000 by:

One of them is bound to be you. Or ask another user on the machine to pull the account list.

Photo by Bernt Rostad

You might also like