wsl 问题记录,研发环境初始化

2024-09-03T10:40:40+08:00 | 1 minute read | Updated at 2025-11-06T15:45:31+08:00

WSL 内核版本升级

WSL 磁盘空间释放

这是记录wsl运行中的异常文件

rm -rf /mnt/c/Users/wlky/AppData/Local/Temp/wsl-crashes/*

2. zsk powerlevel10k

sh -c "$(curl -fsSL https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)"

git clone --depth=1 https://gitee.com/fkamrk/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

ZSH_THEME="powerlevel10k/powerlevel10k"

p10k configure

3. docker

sudo apt install docker.io

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json": dial unix /var/run/docker.sock: connect: permission denied

sudo groupadd docker         #添加docker用户组
sudo gpasswd -a $USER docker #将当前用户添加到docker用户组
newgrp docker                #更新docker用户组

-- 可能可用的镜像,一个一个试
docker pull  registry.docker-cn.com/library/ubuntu:25.10
docker pull  hub-mirror.c.163.com/library/ubuntu:25.10
docker pull  docker.mirrors.ustc.edu.cn/library/ubuntu:25.10
docker pull  yxzrazem.mirror.aliyuncs.com/library/ubuntu:25.10
docker pull  docker.kubesre.xyz/library/ubuntu:25.10
docker pull  dc.j8.work/library/ubuntu:25.10
docker pull  docker.registry.cyou/library/ubuntu:25.10
docker pull  docker.hlyun.org/library/ubuntu:25.10
docker pull  docker.chenby.cn/library/ubuntu:25.10
docker pull  docker.jsdelivr.fyi/library/ubuntu:25.10
docker pull  docker-mirrors.mjjman.com/library/ubuntu:25.10
docker pull  huecker.io/library/ubuntu:25.10
docker pull  dockerhub.timeweb.cloud/library/ubuntu:25.10
docker pull  docker-cf.registry.cyou/library/ubuntu:25.10
docker pull  dockercf.jsdelivr.fyi/library/ubuntu:25.10
docker pull  dockertest.jsdelivr.fyi/library/ubuntu:25.10


docker pull dockerhub.azk8s.cn/library/ubuntu:25.10
docker pull mirror.ccs.tencentyun.com/library/ubuntu:25.10
docker pull registry.cn-hangzhou.aliyuncs.com/library/ubuntu:25.10
docker pull docker.m.daocloud.io/library/ubuntu:25.10


docker tag 47b9904d4474 ubuntu:25.10

docker rmi docker.jsdelivr.fyi/library/ubuntu:25.10

wsl_update_x64
WSL内核更新
https://www.catalog.update.microsoft.com/Search.aspx?q=wsl
下载内核文件,然后解压出wsl_update_x64

使用wsl --shutdown 关闭wsl,运行文件升级
打开wsl
uname -a 

WSL磁盘空间回收

https://zhuanlan.zhihu.com/p/521747491

wsl --shutdown
diskpart
select vdisk file="C:\Users\Esoye\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx"
select vdisk file="C:\Users\Esoye\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx"
compact vdisk
detach vdisk

© 2016 - 2025 Askyx's Blog

🌱 Powered by Hugo with theme Dream.

About Me

This is my blog.

ヾ(•ω•`)o

比较胆小,出门都得贴墙走