重置windows10 WSL中ubuntu的密码 以管理员的权限打开powershell的窗口 在powershell中执行一下命令切换为root用户 ubuntu config --default-user root 重新打开一个ubuntu shell,此时默认为root用户 在ubuntu shell中重置某个用户的密码 passwd <你的用户名> 在powershell中执行一下命令切换为你的用户名 ubuntu config --default-user <你的用户名> 参考文档: reset-ubuntu-password-in-wsl-on-windows-10