原文件重命名备份

sudo mv /etc/apt/sources.list /etc/apt/source.list.bak

编辑源列表文件

sudo vim /etc/apt/sources.list

用下面的文本作为内容

  • ubuntu 14

    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
  • ubuntu 16
    deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # 源码
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # Canonical 合作伙伴和附加
    deb http://archive.canonical.com/ubuntu/ xenial partner
    deb http://extras.ubuntu.com/ubuntu/ xenial main

更新

sudo apt-get update
sudo apt-get upgrade

Ubuntu 修改apt-get源为阿里源的更多相关文章

  1. [转]centos7 修改yum源为阿里源

    centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里 cd /etc/yum.repos.d 接着备份旧的配置文件 sudo mv CentOS-Base.repo ...

  2. centos7 修改yum源为阿里源

    centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里 安装base reop源 cd /etc/yum.repos.d 接着备份旧的配置文件 sudo mv Cen ...

  3. ubuntu16.04更改源为阿里源

    一.通过系统更换源 第一步:备份原来的源文件cd /etc/apt/  然后会显示下面的源文件sources.list输入命令sudo cp sources.list sources.list.bak ...

  4. [转帖]ubuntu 修改 apt源的方法

    https://www.cnblogs.com/dadonggg/p/11129973.html ubuntu 和 centos 是不一样的 ubunut 里面 用deb开头 放置到 /etc/apt ...

  5. Ubuntu通过终端命令行换阿里源

    检查Ubuntu系统的Codename $ lsb_release -a 得到结果: No LSB modules are available. Distributor ID: Ubuntu Desc ...

  6. Centos 7 修改yum源为阿里源

    因为官方的yum源在国内访问效果不佳, 需要改为国内比较好的阿里云或者网易的yum源, 具体修改步骤如下: cd /etc/yum.repos.d # 备份旧的配置文件 mv CentOS-Base. ...

  7. 修改maven的源地址为阿里源

    在放maven的安装文件里,找到settings.xml,如下图所示 将默认的源地址改为阿里源,需要在settings.xml文件相应的位置上加上如下的一串:  <mirror> < ...

  8. 在centos中修改yum源为阿里源

    cd /etc/yum.repos.d 备份旧的配置文件:mv CentOS-Base.repo CentOS-Base.repo.bak 下载阿里源的文件: wget -O CentOS-Base. ...

  9. ubuntu20.04 LTS 更换国内163源、阿里源、清华源、中科大源

    Ubuntu 20.04 是 Ubuntu 的第 8 个 LTS 版本,其重大更新和改进将在 2030 年前终止,计划于2020年 4 月 23 日发布. 国内有很多Ubuntu的镜像源,有阿里的.网 ...

随机推荐

  1. 【CTS2019】氪金手游(动态规划)

    [CTS2019]氪金手游(动态规划) 题面 LOJ 洛谷 题解 首先不难发现整个图构成的结构是一棵树,如果这个东西是一个外向树的话,那么我们在意的只有这棵子树内的顺序关系,子树外的关系与这棵子树之间 ...

  2. 【02】Python:数据类型和运算符

    写在前面的话 任何编程语言一开始都是从概念出发的,但各种编程语言之间的概念可能又会有差异,所以,老生常谈,我们还是需要从新过一遍 Python 的概念,当然,如果你已经是老司机了,完全可以一晃而过,不 ...

  3. 在Windows10 安装 Linux 子系统

    在工作中我们经常需要在Windows中安装Linux系统来完成一些工作,通常使用VMware.virtualpc,Hyper-V等虚拟化技术来实现,Now,我们有了更便利的方法来实现,这就是Windo ...

  4. 初识Markdown

    目录 一.基础语法 二.语法规则 1.标题 2.列表 3.文字格式 4.链接 5.图片 6.引用 7.水平分隔线 8.代码块 9.表格 10.文档目录 11.转义定义 写在前面 Markdown(简称 ...

  5. mssql 根据执行计划细节做优化操作

    示例: 1.如果select * 通常情况下聚集索引会比非聚集索引更优. 2.如果出现Nested Loops,需要查下是否需要聚集索引,非聚集索引是否可以包含所有需要的列. 3.Hash Match ...

  6. form.submit()提交后返回数据的处理

    form.submit()发送请求一般是单向的,如果需要取返回的数据,一般会发送ajax请求,但是如果form中有附件呢?(以后有时间给大家分享ajax上传附件的功能),确实需要返回数据来知道该功能是 ...

  7. Power BI连接Oracle的注意事项

    开始 Power BI 连接Oracle需要安装对应位数的ODAC,这个过程中有几个点要注意. ODAC 12c.x 版本(32.64),在安装时要将GAC的勾搭上.否则打开Power BI时会提示找 ...

  8. 英语chiltonite葡萄石chiltonite单词

    葡萄石Chiltonite 1.葡萄石能够促进血液循环,具有美容养颜的功效,非常适合女性佩戴,可以增加个人魅力,还能加强事业财运,凝聚财富气场. 2.绿色光对应人体心轮,对心脏,肺脏有效用,内涵的磁石 ...

  9. 面向对象(五)--isinstance与issubclass方法、反射、内置方法(部分)、异常处理

    一.isinstance与issubclass方法 1.isinstance是用来判断对象是否是某个类 isinstance(obj,class) 2.issubclass是用来判断一个类是否为另一个 ...

  10. nginx设置开机自启

    环境:centos7 nginx1.16.1 方法一:(适用于centos7以上版本) 使用systemctl工具 方法二:(使用多种linux) 使用nginx官方的脚本,设置开机自启