详细介绍:WSL 提速配置 checklist

WSL 提速配置 checklist

       摘要:你整理一个完整的 WSL 提速配置 checklist,包含 WSL 安装源、apt 镜像、pip/conda镜像、网络/DNS优化、内核更新 等所有关键步骤。

我会分成两类:

  • 步骤性 checklist:告诉你该做什么,便于逐条排查。
  • 可直接复制粘贴的配置示例:比如 sources.listpip.conf、conda channels 等。

✅ WSL 提速配置 Checklist

1. 安装/更新 WSL 本体


2. 安装 Linux 发行版时

  • 如果商店下载慢:
    • aka.ms/wslstore 下载离线 .appx 包,PowerShell 安装:
      Add-AppxPackage .\Ubuntu_20.04.appx

3. Linux 内 apt 源加速

  • 编辑源文件:
    sudo nano /etc/apt/sources.list
  • 替换为国内镜像(以 Ubuntu 20.04 为例):
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
  • 更新:
    sudo apt update && sudo apt upgrade

4. pip 加速

  • ~/.pip/pip.conf 写入:
    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple

5. Conda 加速

    posted @ 2025-10-30 14:09  gccbuaa  阅读(6)  评论(0)    收藏  举报