原文件重命名备份

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. 『optimization 动态规划』

    optimization Description \(visit\_world\) 发现有些优化问题可以用很平凡的技巧解决,所以他给你分享了这样一道题: 现在有一个长度为N的整数序列\(\{a_i\} ...

  2. python学习--大数据与科学计算第三方库简介

    大数据与科学计算  库名称 简介 pycuda/opencl GPU高性能并发计算 Pandas python实现的类似R语言的数据统计.分析平台.基于NumPy和Matplotlib开发的,主要用于 ...

  3. eclipse安装sts

  4. 用javascript写了一个模拟阅读小说的程序

    <html> <meta http-equiv="content-type" content="text/html; charset=UTF-8&quo ...

  5. Java中的equals与==

    package demo; public class Test { public static void main(String[] args) { String str1 = new String( ...

  6. ORACLE隐藏参数查看及修改

    查看隐藏参数 select x.ksppinm name, y.ksppstvl value, y.ksppstdf isdefault, decode(bitand(y.ksppstvf,7),1, ...

  7. CentOS6安装部署配置Nginx

    操作系统: CentOS 6.9 脚本语言: shell https://github.com/iscongyang/Practical/blob/master/shell-scripts/insta ...

  8. php获取ssl验证的https页面的源码

    $response = "https://faculty.xidian.edu.cn/system/resource/tsites/tsitesencrypt.jsp?id=_tsites_ ...

  9. Nginx 高级配置-压缩功能

    Nginx 高级配置-压缩功能 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Nginx压缩相关参数概述 1>.gzip on | off; Nginx支持对指定类型的文 ...

  10. python 使用sort 对列表排序的性能测试

    首先对一百万数据进行排序: 对一千万数据进行排序: 对一亿数据进行排序: