1. 程式人生 > >更換Debian更新源為163的源

更換Debian更新源為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