返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
Windows

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

曦远 (DealiAxy)约 2 分钟
目录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 许可协议。转载请注明出处!

相关文章

Windows也能拥有好用的命令行吗?Powershell+Terminal折腾记录(v1.0版本)

Windows一向以图形化操作入门容易著称,所以对于命令行的支持一直为人所诟病,比起Linux或者mac都是被吊打的。这一局面在最近几个版本的Windows10更新里,特别是微软官方出了WindowsTerminal这个大杀器之后有所改善~ 所以对于标题的这个问题,只能说「勉强可以吧」,本文介绍几个折腾命令行的方法。 效果图 ~~偷一张官方的截图,应该没人发现吧~~ 建议先熟读官方文档:https

2024-02-29 · Windows · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…