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/
Views : 57135
linux
Source by It’s FOSS – Linux Portal