Thumbnail

How To Change Forgotten Password in Windows 10 WSL


Did you forget your WSL root password? Would you like to change it in a few simple steps? Well, keep on reading
I am going to show you here how to change your WSL root password without deleting, uninstalling, or even cracking your WSL. In just a simple steps you can recover your WSL password.

 

1. Before you exit WSL2 check your username by typing whoami.

2. Next, open Command Prompt Windows Key + r and type cmd then press enter

3. In the cmd type wsl –u root

You are now logged in as root in WSL without even typing the current password.

 

4. Install passwd using this command apt install passwd

5. Now type passwd <username from the first step >. Enter your new password.

6. That’s it! Now open Ubuntu or whatever distribution you installed and check if it’s working

© 2025 Akademyas. All rights reserved
Privacy