Ubuntu 14.04 apt-get更换阿里云源

本文提供了一套详细的步骤来更换Ubuntu系统的软件源为阿里云提供的镜像站点,通过备份原有的软件源文件并修改为阿里云镜像地址,可以显著提高在特定区域内的更新和下载速度。

废话不多说,下面的代码贴到命令行即可

mv /etc/apt/sources.list /etc/apt/sources.list.bak

cat > /etc/apt/sources.list << EOF  
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
EOF  

apt-get update


buntu@ubuntu-VirtualBox:~$ sudo apt-get update 忽略:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic InRelease 忽略:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates InRelease 忽略:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports InRelease 错误:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic Release 404 Not Found [IP: 101.6.15.130 80] 错误:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates Release 404 Not Found [IP: 101.6.15.130 80] 错误:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports Release 404 Not Found [IP: 101.6.15.130 80] 忽略:7 http://security.ubuntu.com/ubuntu mantic-security InRelease 错误:8 http://security.ubuntu.com/ubuntu mantic-security Release 404 Not Found [IP: 185.125.190.83 80] 正在读取软件包列表... 完成 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic Release” 没有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-updates Release” 没有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-backports Release” 没有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://security.ubuntu.com/ubuntu mantic-security Release” 不再含有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 ubuntu@ubuntu-VirtualBox:~$ ubuntu@ubuntu-VirtualBox:~$ sudo apt-get update 忽略:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic InRelease 忽略:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates InRelease 忽略:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports InRelease 错误:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic Release 404 Not Found [IP: 101.6.15.130 80] 错误:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-updates Release 404 Not Found [IP: 101.6.15.130 80] 错误:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu mantic-backports Release 404 Not Found [IP: 101.6.15.130 80] 忽略:7 http://security.ubuntu.com/ubuntu mantic-security InRelease 错误:8 http://security.ubuntu.com/ubuntu mantic-security Release 404 Not Found [IP: 185.125.190.83 80] 正在读取软件包列表... 完成 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic Release” 没有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-updates Release” 没有 Release 文件。 N: 无法安全地用该进行更新,所以默认禁用该。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 E: 仓库 “http://cn.archive.ubuntu.com/ubuntu mantic-backports Release” 没有 Release 文件。 ubuntu@ubuntu-VirtualBox:~$ ^[[2~ 库创建和用户配置方面的细节。ease” 不再含有 Rel
最新发布
11-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值