Linux修改下载源

Linux上下载大的点的软件都把人等的崩溃。都是从国外的网站下载,在我大天朝你们懂的,所以就把他的源给换一下,我觉得还是阿里牛逼!!!!多谢马粑粑了!

首先我需要搞清楚是哪个发行版的Linux的第几个版本,对应版本去找源

我本次在虚拟机上装的是ubuntu20.04TLS

阿里云ubuntu源路径,根据版本去查找对应的
https://developer.aliyun.com/mirror/ubuntu

备份原始文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo su获得超级管理员权限
编辑sources.list,删除之前的链接,将阿里云的链接粘贴进去,保存

vim /etc/apt/sources.list
更新源(前面已经获得超级管理员权限)

apt-get update
apt-get update

好了,完成。现在下载杠杠的!

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
上一篇:apt添加阿里、华为的镜像源 


下一篇:Ubuntu20.04.1LTS解决NAT方式连接网络后换源更新及本地SSH连接的问题