咨询热线:4006-75-4006

售前:9:00-23:30    备案:9:00-18:00    技术:7*24h

Ubuntu 16.04配置国内高速apt-get更新源

2018-05-28 08:29:31 9617次

Ubuntu 16.04下载软件速度有点慢,因为默认的是从国外下载软件,那就更换到国内比较好的快速更新源(就是这些软件所在的服务器),一般直接百度Ubuntu更新源就能出来一大堆,这时候最好是找和自己Ubuntu版本一致的更新源,我的Ubuntu版本是16.04,下面是我找到的一个比较好的更新源。

1.寻找国内镜像源

https://www.landui.com/help/ubuntu/


2.配置source  list源

sources.list系统自带的,源是来Ubuntu的官网!安装包比较慢,所以最好切换成国内的

linuxidc.com@ubuntu:~$ cd /etc/apt
linuxidc.com@ubuntu:/etc/apt$ sudo cp sources.list sources.list.bak
linuxidc.com@ubuntu:/etc/apt$ vim sources.list                                                 

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://www.landui.com/ubuntu/ xenial main restricted universe multiverse
# deb-src https://www.landui.com/ubuntu/ xenial main restricted universe multiverse
deb https://www.landui.com/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://www.landui.com/ubuntu/ xenial-updates main restricted universe multiverse
deb https://www.landui.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://www.landui.com/ubuntu/ xenial-backports main restricted universe multiverse
deb https://www.landui.com/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://www.landui.com/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://www.landui.com/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://www.landui.com/ubuntu/ xenial-proposed main restricted universe multiverse

3. 更新源

linuxidc.com@ubuntu:/etc/apt$ sudo apt-get update 
命中:1 http://www.landui.com/ubuntu xenial InRelease
命中:2 http://www.landui.com/ubuntu xenial-updates InRelease        
命中:3 http://www.landui.com/ubuntu xenial-backports InRelease      
命中:4 http://www.landui.com/ubuntu xenial-security InRelease        
正在读取软件包列表... 完成 

测试:安装sl包
linuxidc.com@ubuntu:/etc/apt$ sudo apt-get install sl

linuxidc.com@ubuntu:/etc/apt$ sl


首页
最新活动
个人中心