WSL——忘记root密码(Ubuntu)
WSL
Issues found on WSL
项目地址:https://gitcode.com/gh_mirrors/ws/WSL

·
1、问题描述
- Windows下的WSL(Ubuntu)忘记了root密码,无法使用管理员权限。
2、解决方法
- 关闭 Ubuntu 窗口。
- 打开 Windows 的 Powershell 或 cmd, 以 root 默认登陆 WSL。
-
wsl -u root
-
- 修改对应用户密码。
-
# xxx为要修改密码的用户名 passwd xxx
-
- 输入密码,确认密码,修改成功。




Issues found on WSL
最近提交(Master分支:5 个月前 )
8c61f09e
* Add super user detection; a powershell approach is used
* use the 'id' command
* avoid stderr warning & wsl alias 17 天前
ae780d11
17 天前
更多推荐
所有评论(0)