0%

debian换源

debian更换国内软件源

备份原软件源

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

主要域名

1
2
3
4
5
6
7
8
9
10
11
http://mirrors.163.com/debian/
http://mirrors.aliyun.com/debian/
https://mirrors.ustc.edu.cn/debian/
https://mirrors.huaweicloud.com/debian/
http://mirrors.cloud.tencent.com/debian/
https://mirrors.tuna.tsinghua.edu.cn/debian/
--------------------------------------------
http://ftp.cn.debian.org/debian/
http://ftp2.cn.debian.org/debian/
https://mirror.sjtu.edu.cn/debian/
https://mirrors.bfsu.edu.cn/debian/

Debian 6

阿里

1
2
3
4
5
6
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.aliyun.com/debian/ squeeze main non-free contrib
deb http://mirrors.aliyun.com/debian/ squeeze-proposed-updates main non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ squeeze main non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ squeeze-proposed-updates main non-free contrib
EOF

中科大

1
2
3
4
5
6
7
8
cat >> /etc/apt/sources.list  << EOF
deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
EOF

163

1
2
3
4
5
6
7
8
9
10
11
12
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.163.com/debian/ squeeze main non-free contrib
deb http://mirrors.163.com/debian/ squeeze-lts main non-free contrib
deb http://mirrors.163.com/debian/ squeeze-updates main non-free contrib
deb http://mirrors.163.com/debian-backports/ squeeze-backports main contrib non-free
deb http://mirrors.163.com/debian-security/ squeeze/updates main non-free contrib
#deb-src http://mirrors.163.com/debian/ squeeze main non-free contrib
#deb-src http://mirrors.163.com/debian/ squeeze-lts main non-free contrib
#deb-src http://mirrors.163.com/debian/ squeeze-updates main non-free contrib
#deb-src http://mirrors.163.com/debian-backports/ squeeze-backports main contrib non-free
#deb-src http://mirrors.163.com/debian-security/ squeeze/updates main non-free contrib
EOF

Debian 7

阿里

1
2
3
4
5
6
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
deb http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
EOF

中科大

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb https://mirrors.ustc.edu.cn/debian/ wheezy main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ wheezy-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ wheezy-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ wheezy/updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ wheezy main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ wheezy-backports main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ wheezy-updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian-security/ wheezy/updates main contrib non-free
EOF

163

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.163.com/debian/ wheezy main non-free contrib
deb http://mirrors.163.com/debian/ wheezy-backports main non-free contrib
deb http://mirrors.163.com/debian/ wheezy-updates main non-free contrib
deb http://mirrors.163.com/debian-security/ wheezy/updates main non-free contrib
#deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib
#deb-src http://mirrors.163.com/debian/ wheezy-backports main non-free contrib
#deb-src http://mirrors.163.com/debian/ wheezy-updates main non-free contrib
#deb-src http://mirrors.163.com/debian-security/ wheezy/updates main non-free contrib
EOF

Debian 8

阿里

1
2
3
4
5
6
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
EOF

中科大

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb https://mirrors.ustc.edu.cn/debian/ jessie main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ jessie-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ jessie-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ jessie/updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ jessie main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ jessie-backports main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ jessie-updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian-security/ jessie/updates main contrib non-free
EOF

163

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports 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
#deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
#deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
#deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
#deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
EOF

Debian 9

阿里

1
2
3
4
5
6
7
8
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
#deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
#deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
#deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
EOF

中科大

1
2
3
4
5
6
7
8
9
10
11
12
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-proposed-updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib
#deb-src http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib
#deb-src http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib
#deb-src http://mirrors.ustc.edu.cn/debian/ stretch-proposed-updates main non-free contrib
#deb-src http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib
#deb-src http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib
EOF

163

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
#deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
#deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
#deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
#deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
EOF

Debian 10

阿里源

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
EOF

中科大

1
2
3
4
5
6
7
8
cat >> /etc/apt/sources.list  << EOF
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
#deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
EOF

清华大学

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
#deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
#deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
#deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
#deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
EOF

Debian 11

1
2
3
4
5
6
7
8
9
10
cat >> /etc/apt/sources.list  << EOF
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
EOF
------------- 本 文 结 束 感 谢 您 的 阅 读 -------------