Win11下Linux错误。
想在Win11下安装Linux程序。开始按照ubuntu帮助主页的说明都搞好了。
主要cmd命令如下:
1 | wsl --install #安装wsl(Windows Subsystem for Linux) |
谁知不知道弄了啥就打不开了。
然后多次删掉ubuntu系统,然后又重新安装。结果还是出问题。见封面图。后来还有”占位程序接收到错误数据。 Error code: Wsl/Service/0x800706f7 Press any key to continue…”这个问题。
用管理员身份打开cmd输入这个
1 | netsh winsock reset |
然后重新安装。然后还是不行。然后又遇到这个问题“Failed to attach disk ‘C:\Users<User>\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx’ to WSL2: The system cannot find the file specified.
Error code: Wsl/Service/CreateInstance/MountVhd/ERROR_FILE_NOT_FOUND”。
然后查看安装的linux系统
1 | wsl -l |
注销linux系统
1 | wsl --unregister xxx # xxx为安装的系统名 |
最后重新安装就好了。