Logo
BlogToast.
HomeAll PostsCategoriesRandom
Sign in
Logo
BlogToast.

Discover stories, insights, and perspectives from writers around the world.

Explore

  • All posts
  • Categories
  • Random

Dashboard

  • Sign in
  • Sign up
  • Forgot password

Legal

  • Contact
  • Privacy policy
  • Terms of service

© 2026 BlogToast. All rights reserved.

Reset forgotten password in Ubuntu WSL: A comprehensive guide
Education2 min read

Reset forgotten password in Ubuntu WSL: A comprehensive guide

N

N@rutO

January 24, 2025

If you are using windows with WSL Ubuntu and forgot the password, resetting it would be a hassle. However, you can reset the password without reinstalling the distro or losing the data. This is a step-by-step guide to reset a forgotten password in Ubuntu WSL running on windows and not a guide to cause harm in any form. Please follow this guide if you:

  • Forgot password without use for long period

  • Setup random password accidentally

Here is the Step-by-Step guide to reset your Ubuntu WSL password running on windows.

  1. Open CMD or PowerShell as an Administrator.

    • Click Start or press windows button

    • Type cmd or powershell to search

    • Right click and select Run as administrator.

  2. List your installed Linux distributions

    wsl -l -v

    Example:

     NAME                STATE           VERSION
    * Ubuntu    running         2
  3. Launch WSL as root user

    Type exact name of your ubuntu distribution (Ubuntu in my case it might be Ubuntu-24.0)

    wsl -d Ubuntu -u root
  4. Figure out your username (if you know your username, skip this step)

    ls /home 
  5. Reset your password

    passwd yourusername

    Replace yourusername with above output or your known username

    Enter new UNIX password: 
    Retype new UNIX password:
     passwd: password updated successfully    

    Enter new password and complete the process.

Hope you have successfully reset your password. If you have any problem, feel free to contact me.

Tags

ubuntu wsl forgot password reset
Advertisement

Discussion (0)

Related Blogs

Explore similar articles

What to do immediately after database update in laravel?
Education
3 min

What to do immediately after database update in laravel?

J

N@rutO

Aug 14

2 0
Setup environment variables in cypress: A comprehensive guide.
Education
2 min

Setup environment variables in cypress: A comprehensive guide.

J

N@rutO

Sep 18

0 0