Reset SUDO password in WSL (Windows Subsystem for Linux)

When I was learning MongoDB, I came into 1a situation to re-set the sudo password in WSL. I’m sharing how to reset the sudo password in WSL.

  1. Go to windows command prompt and run as administrator
  2. Run the command wsl -u root

3. Type the passwd <user_name>

4. Terminal will prompt for new password and update the new password. The password is reset now.

print

Leave a Reply

Your email address will not be published. Required fields are marked *


− two = 6