WSL(Windows Subsystem for Linux)初始修改 root 密码

以 Ubuntu 为例

Win + x,然后按 A,执行此命令 ubuntu config --default-user root
然后执行 ubuntu
执行 passwd 命令,修改新密码
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:UsersNowTime> ubuntu config --default-user root
PS C:UsersNowTime> ubuntu
root@WenzhouChan:~# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@WenzhouChan:~#
原文地址:https://www.cnblogs.com/alphacode/p/13692873.html