What to Do If You Forget the WSL Root Password
Solution First, opening WSL does not require entering a password. If the default user when you open WSL is not root, please modify it as follows. Change the default WSL login user Start PowerShell with administrator privileges lxrun /setdefaultuser root At this point, reopening WSL will log you in as the root user, and no password is required. Then enter the following command to change the password. passwd root About For more interesting operations, follow my WeChat official account: DealiA
目录4 个章节
Solution
First, opening WSL does not require entering a password. If the default user when you open WSL is not root, please modify it as follows.
Change the default WSL login user
Start PowerShell with administrator privileges
lxrun /setdefaultuser root
At this point, reopening WSL will log you in as the root user, and no password is required.
Then enter the following command to change the password.
passwd root
About
For more interesting operations, follow my WeChat official account: DealiAxy Every article is also collected on my blog: blog.deali.cn
_EOF_
What to Do If You Forget the WSL Root Password
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
使用twinkle-tray快捷调整多个显示器的亮度
自从安装了这个小工具,我再也没用过笔记本键盘上的快捷键了~
2025-01-26 · Windows · 约 1 分钟
从SSH远程到Git Push:在Windows上一步到位实现免密码登录
我一直希望在Windows上能像在Linux系统中那样,通过SSH密钥实现免密码远程连接。每次远程连接到服务器时,手动输入密码既麻烦又不太安全,尤其是在我需要频繁操作的情况下。
2025-02-10 · Windows · 约 1 分钟
2024年,提升Windows开发和使用体验的一些实践 - 包管理器篇
Windows包管理器?scoop开源自定义,winget官方凑合,WingetUI图形界面总算不用手动折腾了。效率提升?哼,总算不是Linux小众玩家的专利。
2024-02-29 · Windows · 约 1 分钟
在Windows上将git与ssh-agent搭配使用
Windows git 还自带 ssh?真是老土的兼容性思路。一行配置就能解决,不过得先管好 ssh-agent 的连接。 ProxyCommand 居然又添乱,难怪老出毛病。
2025-08-21 · Windows · 约 1 分钟
讨论
共 0 条加载评论中…
