更换Debian更新源为163的源

发表于 2018-08-08   |   分类于 技术教程     阅读:(201)

若要更换其他的源操作类似,只需第三步 163源替换成你需要的源.

第一步:查看原始更新源内容

$ sudo cat /etc/apt/sources.list
deb http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie-updates main
deb http://security.debian.org jessie/updates main
第二步:备份更新源

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

第三步:更新源为163的源

$ sudo echo 'deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' > /etc/apt/sources.list
更新

$ sudo apt-get update
Ign http://mirrors.163.com jessie InRelease
Get:1 http://mirrors.163.com jessie-updates InRelease [145 kB]
Get:2 http://mirrors.163.com jessie/updates InRelease [63.1 kB]
Get:3 http://mirrors.163.com jessie Release.gpg [2373 B]
Get:4 http://mirrors.163.com jessie Release [148 kB]
Get:5 http://mirrors.163.com jessie-updates/main amd64 Packages [17.6 kB]
Get:6 http://mirrors.163.com jessie-updates/non-free amd64 Packages [449 B]
Get:7 http://mirrors.163.com jessie-updates/contrib amd64 Packages [20 B]
Get:8 http://mirrors.163.com jessie/updates/main amd64 Packages [438 kB]
Get:9 http://mirrors.163.com jessie/updates/non-free amd64 Packages [20 B]
Get:10 http://mirrors.163.com jessie/updates/contrib amd64 Packages [2366 B]
Get:11 http://mirrors.163.com jessie/main amd64 Packages [9049 kB]
Get:12 http://mirrors.163.com jessie/non-free amd64 Packages [101 kB]
Get:13 http://mirrors.163.com jessie/contrib amd64 Packages [59.5 kB]
Fetched 10.0 MB in 7s (1257 kB/s)
Reading package lists... Done
结束!

发表新评论

© 2019 VPS干货 Powered by Typecho & Theme Quark Google_sitemap baidu_sitemap
友情链接: 简爱博客 小众博客 vps干货 vps优惠码 王阳个人博客 VPS推介 顾建伟个人博客 Dianlin(好基友) 李子博客 主机测评 资源分享 Hello Mango