Change the root password in Windows 10 WSL

Today in this article, we will learn how to change the root password for Wondows10 WSL.

Recently I had an issue executing a few commands in WSL.

Later I realized, I forgot the password and the best way way to fix the issue is changing the password.

I had to change the root password using the WSL root command as below,

  • Open Command Prompt
  • Type below command

 wsl -u root 

  • Once you enter the panel as root type below command,

passwd <UserName>

That’s all, you will be all set to log in now.

That’s all! Happy coding!

Does this help you fix your issue?

Do you have any better solutions or suggestions? Please sound off your comments below.



Please bookmark this page and share it with your friends. Please Subscribe to the blog to receive notifications on freshly published(2024) best practices and guidelines for software design and development.



Leave a Reply

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