Quantcast
Channel: Reset the password in Ubuntu / Linux Bash in Windows - Ask Ubuntu
Viewing all articles
Browse latest Browse all 8

Answer by NotTheDr01ds for Reset the password in Ubuntu / Linux Bash in Windows

$
0
0

The other answers here, while mostly valid, are vastly overcomplicated. To change your user password in any WSL distribution, simply:

From inside Ubuntu (or another distribution):

wsl.exe \~ -u root -d $WSL_DISTRO_NAME -e passwd $USER

*Requires WSL Interop to be enabled.

Or from PowerShell or CMD (as a regular, non-admin user):

wsl ~ -u root -e passwd <username># Add the -d <distro_name> if not using the default distro

*Does not require WSL Interop.


Viewing all articles
Browse latest Browse all 8

Trending Articles