码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu更换源的方法

时间:2016-04-07 17:08:31      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

1.查看ubuntu版本的方法:

使用命令 sudo lsb_release -a

输出如下:

root@localhost:/etc/apt# sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty

2.保存原源

root@localhost:/etc/apt# cp sources.list sources.list.bak

root@localhost:/etc/apt# vi sources.list

修改为下面的内容:

中国科学技术大学源:

Trusty(14.04)

 

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

3.修改完成后

root@localhost:/etc/apt# apt-get update

 

鸣谢:

http://blog.csdn.net/debug_cpp/article/details/2687067

http://linux.it.net.cn/Ubuntu/2015/0111/11849.html

ubuntu更换源的方法

标签:

原文地址:http://www.cnblogs.com/gengzhaoyun/p/5364327.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!