记录一下安装流程, 参考官方文档
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
然后重启电脑.
sudo passwd root
输入自己的密码, 然后设置root的密码
dengfei@DESKTOP-PJ6RTVA:~$ sudo passwd root [sudo] password for dengfei: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully dengfei@DESKTOP-PJ6RTVA:~$ su root Password: root@DESKTOP-PJ6RTVA:/home/dengfei#
apt update