Skip to content

一些常用的镜像源

国内的常用镜像源

nodejs

bash
npm config set registry https://registry.npmmirror.com

ubuntu 等

bash
#ubuntu 24.04以上
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's#http://archive.ubuntu.com#https://mirrors.aliyun.com#g' /etc/apt/sources.list

sudo sed -i 's#http://security.ubuntu.com#https://mirrors.aliyun.com#g' /etc/apt/sources.list

sudo apt update
bash
#ubuntu 22.04以下
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak

sudo sed -i 's#http://archive.ubuntu.com#https://mirrors.aliyun.com#g' /etc/apt/sources.list.d/ubuntu.sources

sudo sed -i 's#http://security.ubuntu.com#https://mirrors.aliyun.com#g' /etc/apt/sources.list.d/ubuntu.sources

sudo apt update

Last updated: