266 字
1 分钟
Ubuntu 国内镜像源汇总
apt 源
配置地址:/etc/apt/sources.list
apt 清华源:ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
快速配置镜像源
- Ubuntu 20.04 LTS
sudo sh -c 'echo "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 http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse" > /etc/apt/sources.list'
- Ubuntu 22.04 LTS
sudo sh -c 'echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" > /etc/apt/sources.list'
apt 官方源:Ubuntu 22.04 系统默认官方源/腾讯云源/清华源/中科大源/阿里云源
清除所有软件源:sudo rm -rf /etc/apt/sources.list.d/*
pip 源
临时使用:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
设为默认:pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pypi | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
docker 源
conda 源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/
conda config --set show_channel_urls yes
npm 源
npm config set registry https://registry.npmmirror.com
npm 使用国内淘宝镜像(最新地址)_npm 最新淘宝镜像-CSDN 博客