WSL (windows subsystem for linux) ubuntu忘记密码找回方法

程序员成长之旅 · 程序员成长之旅/Windows技巧 · 133 字

假设用户 <username> 忘记了密码 :: windows cmd ubuntu config --default-user root :: 设置ubuntu默认用户为root ubuntu :: 进入默认用户为root的系统

x

1 :: windows cmd 2 ubuntu config --default-user root :: 设置ubuntu默认用户为root 3 ubuntu :: 进入默认用户为root的系统 进入系统后 passwd <username> #键入密码 exit

x

1 passwd <username> 2 #键入密码 3 exit 设置成功后 :: windows cmd ubuntu config --default-user root :: 设置ubuntu默认用户为 <username>

x

1 :: windows cmd 2 ubuntu config --default-user root :: 设置ubuntu默认用户为 <username>