I started working on a new project recently gmail_unsubscriber and had to revamp my developer setup.
In this case I’m working on python 3.11 on Windows 10 and I decided to use VSCODE and WSL. I noticed I didn’t knew my WSL password anymore to setup a new python and. venv.
Luckily you can use the following steps to solve this. Leaving this should someone find this handy in the future.
Change Default user to Root
The process to reset a user root password is very similar to the standard how is done in Linux. You need to boot your system as root user, to be able to reset other users passwords.
Open a new terminal by typing “cmd” on windows search and open it.
ubuntu config --default-user root

For other distributions you could use the following commands
ubuntu config –default-user root
ubuntu2004 config –default-user root
ubuntu1804 config –default-user root
debian config –default-user root
kali config –default-user root
Once Root, Change Password for your user.
Change your user password with the following command
passwd username
Revert Back to your default user.
Change your user back to the original, again on a windows cmd.
ubuntu config --default-user robert
Look into our other WSL Content you might like
Here is some other WSL related content you might like. If you are a developer getting more familiar with WSL, this content might be for you.