linux 命令行下更换软件源

首先备份默认源:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.old

清空默认源:

sudo cat /dev/null > /etc/apt/sources.list

添加源:

sudo vim /etc/apt/sources.list

推荐源:

#台湾源

deb http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted


#网易 Ubuntu 源(速度很快)

deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted

#骨头源,骨头源是bones7456架设的一个Ubuntu源 ,提供ubuntu,deepin

deb http://ubuntu.srt.cn/ubuntu/ precise main universe restricted multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ precise main universe restricted multiverse
deb http://ubuntu.srt.cn/ubuntu/ precise-security universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ precise-security universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ precise-updates universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ precise-proposed universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ precise-proposed universe main multiverse restricted
deb http://ubuntu.srt.cn/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://ubuntu.srt.cn/ubuntu/ precise-updates universe main multiverse restricted

#mirror.lupaworld.com的源,速度很快

deb http://mirror.lupaworld.com/ubuntu/archive/ precise main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ precise-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ precise-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ precise-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn/ precise main restricted universe multiverse


#ubuntu.cn99.com源(推荐):

deb http://ubuntu.cn99.com/ubuntu/ precise main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ precise-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ precise main restricted universe multiverse


#电子科技大学

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

#中国科技大学

deb http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

#北京理工大学

deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

#兰州大学

deb ftp://mirror.lzu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu-cn/ precise main multiverse restricted universe

#上海交通大学

deb http://ftp.sjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ precise main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

最后更新一下:sudo apt-get update

转载于:https://www.cnblogs.com/codeAB/p/4421583.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值