Ubuntu安装完毕后,默认使用的是官方的源,在国内访问速度很慢,这里介绍更换为阿里云的源方法。

步骤如下:

1.备份源配置文件

  1. sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

2.用编辑器打开源配置文件

  1. sudo vim /etc/apt/sources.list

3.删除文件内容,更换为以下内容(也可使用其他源)

  1. deb http://mirrors.aliyun.com/ubuntu trusty main restricted
  2. deb-src http://mirrors.aliyun.com/ubuntu trusty main restricted
  3.  
  4. ## Major bug fix updates produced after the final release of the
  5. ## distribution.
  6. deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted
  7. deb-src http://mirrors.aliyun.com/ubuntu trusty-updates main restricted
  8.  
  9. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  10. ## team. Also, please note that software in universe WILL NOT receive any
  11. ## review or updates from the Ubuntu security team.
  12. deb http://mirrors.aliyun.com/ubuntu trusty universe
  13. deb-src http://mirrors.aliyun.com/ubuntu trusty universe
  14. deb http://mirrors.aliyun.com/ubuntu trusty-updates universe
  15. deb-src http://mirrors.aliyun.com/ubuntu trusty-updates universe
  16.  
  17. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  18. ## team, and may not be under a free licence. Please satisfy yourself as to
  19. ## your rights to use the software. Also, please note that software in
  20. ## multiverse WILL NOT receive any review or updates from the Ubuntu
  21. ## security team.
  22. deb http://mirrors.aliyun.com/ubuntu trusty multiverse
  23. deb-src http://mirrors.aliyun.com/ubuntu trusty multiverse
  24. deb http://mirrors.aliyun.com/ubuntu trusty-updates multiverse
  25. deb-src http://mirrors.aliyun.com/ubuntu trusty-updates multiverse
  26.  
  27. ## N.B. software from this repository may not have been tested as
  28. ## extensively as that contained in the main release, although it includes
  29. ## newer versions of some applications which may provide useful features.
  30. ## Also, please note that software in backports WILL NOT receive any review
  31. ## or updates from the Ubuntu security team.
  32. deb http://mirrors.aliyun.com/ubuntu trusty-backports main restricted universe multiverse
  33. deb-src http://mirrors.aliyun.com/ubuntu trusty-backports main restricted universe multiverse
  34.  
  35. deb http://security.ubuntu.com/ubuntu trusty-security main restricted
  36. deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
  37. deb http://security.ubuntu.com/ubuntu trusty-security universe
  38. deb-src http://security.ubuntu.com/ubuntu trusty-security universe
  39. deb http://security.ubuntu.com/ubuntu trusty-security multiverse
  40. deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

4.执行以下命令,刷新

  1. sudo apt-get clean
  2. sudo apt-get update

ubuntu server 系统,更换阿里云源(用户更新源)的更多相关文章

  1. Ubuntu 16.04 更换阿里云源

    Ubuntu 16.04 更换阿里云源sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份sudo gedit /etc/apt/so ...

  2. Ubuntu 14.04 更换阿里云源

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo ...

  3. CentOS 7 更换 阿里云/清华大学 yum 软件源

    阿里云参考:https://opsx.alibaba.com/mirror?lang=zh-CN 清华参考:https://mirrors.tuna.tsinghua.edu.cn/help/cent ...

  4. 阿里云Centos等更新源设置成阿里源方法。

    https://help.aliyun.com/knowledge_detail/5974184.html ---------------------------------------------- ...

  5. Ubuntu 14.04 更换阿里云源[转]

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo ...

  6. 安装Ubuntu服务器版 + 远程连接ssh +更换阿里云源

    安装Ubuntu服务器版 1.点击 "开启此虚拟机",开始安装. 2.默认选择English,英文版安装,直接按Enter键即可. 3.默认选择"Install Ubun ...

  7. Ubuntu 16.04添加阿里云源/163源

    添加国内源有个好处,比如下载软件时直接时国内的服务器,速度有保证. 以下是操作方法: 1.备份 sudo cp /etc/apt/sources.list /etc/apt/sources.list. ...

  8. Ubuntu 16.04添加阿里云源

    转自:http://www.cnblogs.com/EasonJim/p/7119156.html 添加国内源有个好处,比如下载软件时直接时国内的服务器,速度有保证. 以下是操作方法: 1.备份 su ...

  9. Centos更换阿里云源

    1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的CentOS-Base ...

  10. Ubuntu Server如何配置SFTP(建立用户监狱)

    Ubuntu Server如何配置SFTP(建立用户监狱)   SSH File Transfer Protocol是一个比普通FTP更为安全的文件传输协议.(参考资料:http://en.wikip ...

随机推荐

  1. Unable to generate a temporary class (result=1)解决方法

    Unable to generate a temporary class (result=1).error CS2001: Source file 'C:\WINDOWS\TEMP\ug5v9uxt. ...

  2. redis的文件事件处理器

    前言     C10K problem提出了一个问题,如果1w个客户端连接到server上,间歇性的发送消息,有哪些好的方案?     其中的一种方案是,每个线程处理多个客户端,使用异步I/O和就绪通 ...

  3. javaScript 获取主机地址,项目名等

    //获取当前网址  var curWwwPath=window.document.location.href; alert(curWwwPath);  //http://localhost:8080/ ...

  4. PowerShell管理Exchange

    #添加Exchange管理单元get-pssnapin -registeredadd-pssnapin microsoft.exchange* #启用邮箱账号(需要域管理员权限,因为需要将某些属性写入 ...

  5. IE自动化 二(判断IP所在地)

    该脚本用来访问一个url,并取出相应结果(该脚本用来通过淘宝API实现判断一个IP所在地) #定义要访问的URL $url="http://ip.taobao.com/service/get ...

  6. HDU 1695 GCD 容斥

    GCD 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=1695 Description Given 5 integers: a, b, c, d, k ...

  7. 32位Windows7上8G内存使用感受+xp 32位下使用8G内存 (转)

    32位Windows7上8G内存使用感受+xp 32位下使用8G内存 博客分类: Windows XPWindowsIE企业应用软件测试  我推荐做开发的朋友:赶快加入8G的行列吧....呵呵..超爽 ...

  8. EJB究竟是什么,真的那么神奇吗??

    1. 我们不禁要问,什么是"服务集群"?什么是"企业级开发"? 既然说了EJB 是为了"服务集群"和"企业级开发",那么 ...

  9. nexus-2.13.0-01.war

    https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.13.0-01.war

  10. linux php安装扩展方法 查找配置文件

    如何在linux中查看nginx.apache.php.mysql配置文件路径了,如果你接收一个别人配置过的环境,但没留下相关文档.这时该怎么判断找到正确的加载文件路径了.可以通过以下来判断 1.判断 ...