https://docs.microsoft.com/zh-cn/windows/wsl/wsl-config %USERPROFILE%\.wslconfig [wsl2] dnsProxy=false autoProxy=false dnsTunneling=false guiApplications=false networkingMode=Mirrored wsl -t debian wsl --unregister debian # RECOMMEND MICROSOFT STORE wsl --install debian debian/debian wsl -t debian wsl --manage debian --set-default-user root userdel -r debian echo "alias ll='ls --color=auto -Ahl'" >> ~/.bashrc echo "export http_proxy='http://127.0.0.1:1080'" >> ~/.bashrc echo "export https_proxy='http://127.0.0.1:1080'" >> ~/.bashrc echo "export no_proxy='localhost,127.0.0.1'" >> ~/.bashrc # RECONNECT export DEBIAN_FRONTEND=noninteractive apt update && apt -y install ca-certificates sed -i 's|^deb http://|deb https://|g' /etc/apt/sources.list apt update && apt upgrade -y && apt autoremove -y apt -y install aria2 bc bind9-dnsutils curl file gawk git gpg iperf iperf3 mtr rsync sudo unzip vim wget wget2 zstd # https://nodejs.org/en/download curl -o- https://fnm.vercel.app/install | bash fnm install 24 # https://docs.docker.com/engine/install/debian/ systemctl edit docker.service [Service] Environment="HTTP_PROXY=http://127.0.0.1:1080" Environment="HTTPS_PROXY=http://127.0.0.1:1080" Environment="NO_PROXY=localhost,127.0.0.1" systemctl daemon-reload systemctl restart docker git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy http://127.0.0.1:1080 npm config set proxy http://127.0.0.1:1080 --global npm config set https-proxy http://127.0.0.1:1080 --global # RECONNECT (Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | Where-Object { $_.GetValue("DistributionName") -eq 'Debian' }).GetValue("BasePath") + "\ext4.vhdx" wsl --shutdown diskpart select vdisk file="C:\Users\Lenovo\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\ext4.vhdx" attach vdisk readonly compact vdisk detach vdisk exit