Skip to content

Instantly share code, notes, and snippets.

@TheTharz
Created March 18, 2024 06:11
Show Gist options
  • Select an option

  • Save TheTharz/317886a4e828badb4fd1cc614005f609 to your computer and use it in GitHub Desktop.

Select an option

Save TheTharz/317886a4e828badb4fd1cc614005f609 to your computer and use it in GitHub Desktop.
resetting wsl password for root user
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