1.WSL2基础环境
#1.Microsoft Store下载Ubuntu
#2.开启WSL
win+x 选择powershell(管理员)
#3.启用虚拟机
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
# 启用WSL
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
# 系统重启
#4.Ubuntu初始化
zhoayi@ubuntu:~$ sudo passwd
[sudo] password for zhaoyi:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
#5.更新源:
su root
apt-get update
apt-get upgrade
#6.可尝试初始化配置脚本(还没试):https://gitee.com/iwesen/wsl-ubuntu-init
2.WSL存储路径迁移
win+x 选择powershell(管理员)
#1.查看wsl安装哪些分支
wsl -l -v
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu20.04LTS Running 2
Ubuntu Running 2
#2.关闭所有的分支及wsl2<