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

Ubuntu更改国内源,设置固定IP和DNS

时间:2016-04-03 10:17:14      阅读:357      评论:0      收藏:0      [点我收藏+]

标签:

一 更改国内源

 

1 首先备份官方源,以免设置错误可恢复。

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.back

 

2 用编辑器打开 /etc/apt/sources.list文件。

$ sudo nano /etc/apt/sources.list

 

3 删除原有的源,在编辑器中添加新源(阿里源)。如图所示:

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

 

二 设置固定IP

 

Ubuntu更改国内源,设置固定IP和DNS

标签:

原文地址:http://www.cnblogs.com/spkljl/p/5349122.html

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