Forgot WSL password?

No worries, you can easily reset it with simple 5 steps!

  1. Open a command prompt
  2. Change the default user of WSL to root and run .exe file of that distro

<distro name> config — default-user root

<distro name>

3. Change your password

passwd <username>

4. Logout from the WSL distro


5. Change the default user

<distro name> config — default-user <username>

Screenshot of all commands

Hope you find it useful. Have a nice day! :)