How to reset WSL user password

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.

For other distributions you could use the following commands

Once Root, Change Password for your user.

Change your user password with the following command

Revert Back to your default user.

Change your user back to the original, again on a windows cmd.

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.

One thought on “How to reset WSL user password

Add yours

Leave a comment

Blog at WordPress.com.

Up ↑