Created
March 18, 2024 06:11
-
-
Save TheTharz/317886a4e828badb4fd1cc614005f609 to your computer and use it in GitHub Desktop.
resetting wsl password for root user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd in to below directory | |
| cd C:\users\<username>\AppData\Local\Microsoft\WindowsApps | |
| change the user to root | |
| <linuxdistro>.exe config --default-user root | |
| open wsl and now the user will be root | |
| passwd <default_username> | |
| execute this in the above directory and change default user to your user | |
| <distro>.exe config --default-user <username> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment