在Windows10下安装WSLg(Windows Subsystem for Linux GUI)

更新到最新体验版Windows

发现预览体验计划处显示空白。解决方法:在Terminal下依次键入以下命令。

$path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
# Telemetry level: 1 - basic, 3 - full
$value = "3"
New-ItemProperty -Path $path -Name AllowTelemetry -Value $value -Type Dword -Force
New-ItemProperty -Path $path -Name MaxTelemetryAllowed -Value $value -Type Dword -Force

安装虚拟GPU(vGPU)驱动

Intel® Graphics BETA WSL Windows® 10 DCH Drivers

管理员权限运行Terminal,键入命令(以安装Ubuntu为例)

wsl --install -d Ubuntu

安装好后发现运行时产生以下错误:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102

在BIOS里打开virtualization的相关设置即可。

更改默认安装位置

在D盘下新建Wsl文件夹后导出现有系统:

wsl --export Ubuntu D:\Wsl\Ubuntu.tar

注销现有系统:

wsl --unregister Ubuntu

导入系统:

wsl --import Ubuntu d:\Wsl\Ubuntu D:\Wsl\Ubuntu.tar
posted @ 2021-06-10 09:37  宇都宫的小熊  阅读(1844)  评论(0编辑  收藏  举报