Reset Forgotten Ubuntu Linux Password on WSL
WSL (Windows Subsystem for Linux) is a handy tool for people who want to enjoy the power of Linux command line from the comfort of Windows.
When you install Linux using WSL on Windows, you are asked to create a username and password. This user is automatically logged on when you start Linux on WSL.
Now, the problem is that if you haven’t used it for some time, you may forget the account password of WSL. And this will become a problem if you have to use a command with sudo because here you’ll need to enter the password.
Don’t worry. You can easily reset the WSL Password. Just follow the video.
Step 1: Switch to root as default user
ubuntu config –default-user root
Step 2: Reset the password for the account
passwd username
You have to change the username in the above command with the actual user name.
Step 3: Set regular user as default again
ubuntu config –default-user username
Want more details? Text version of this topic: https://itsfoss.com/reset-linux-password-wsl/
ubuntu
Thanks!!
perfect video!!
thank you. very straight forward
Thanks nigga ❤
i could not find my ubuntu version like 2004 or which one
It was very helpful. Thank you
thanks, very helpful
amazing, concise and effective! thanks a lot!
Thank you. you saved a fellow coder!
thanks
very helpful.
me finding out that I am not the only one who forgot the password
Exactly what I needed! Clear, to the point, works. Thank you!
thanks!!!
Great video and explanation
yes thank you my friend
Extremely helpful and easy to follow tutorial. Thank You !👍
thanks it really helped me
It can be done in a few seconds with nothing more than a text editor.
Simply open a console and run:
cd %userprofile%AppDataLocalPackagesCanonicalGroupLimited.UbuntuonWindows_*LocalStaterootfsetc
notepad shadow
Then remove the password hash between the 1st and 2nd colon of your user. Then save the file.
Voilà!
Thanks!
I love this video, it was exactly what I need and I didn't have to listen the full history of Linux as an Intro of the video
Helped thank you
Thanks very much! :heart_hands:
Please can you el ettin error 'ubuntu2004' is not recognized as an internal or external command,
operable program or batch file.
Excelente explicación. Sencilla y funcional. Gracias.