Ubuntu 19.10 的apt源为国内源

一步一步教你如何替换ubuntu的apt源为国内镜像

Posted by HonorJoey on March 2, 2020

切换权限

sudo su

备份

cp -rf /etc/apt/sources.list /etc/apt/sources.list.save

删除原来的

rm /etc/apt/sources.list

新建

vi /etc/apt/sources.list

把以下内容复制进去

#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ eoan main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ eoan-proposed main restricted universe multiverse

#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse

#163源
deb http://mirrors.163.com/ubuntu/ eoan main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ eoan-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ eoan-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ eoan-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ eoan-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ eoan main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ eoan-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ eoan-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ eoan-backports main restricted universe multiverse

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse