ubunto更换yum源

时间:2021-09-27 00:58:27


编辑sources.list
gedit /etc/apt/sources.list
//替换为下面的内容:
#http://mirrors.163.com/debian/为软件源也可以为其他的 bullseye为版本代号 main non-free contrib区别如下
deb http://mirrors.163.com/debian/ bullseye main non-free contrib

deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib

deb http://mirrors.163.com/debian/ bullseye-backports main non-free contrib

deb-src http://mirrors.163.com/debian/ bullseye main non-free contrib

deb-src http://mirrors.163.com/debian/ bullseye-updates main non-free contrib

deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib

#deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib

#deb http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib

#deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib

#deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib

deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib

deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib



## :wq
apt-get update


//如是docker 更换yum


docker cp sources.list $name:/tmp/
docker exec -it $name --user root /bin/bash

更新源
sudo apt-get update(回车) (更新源)
1
sudo apt-get upgrade(回车) (升级源)