【Ubuntu】修改Ubuntu的apt-get源为国内镜像源的方法

  1. 原文件备份
    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  2. 编辑源列表文件
    sudo vim /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

4.运行sudo apt-get update

你可能感兴趣的:(【Ubuntu】修改Ubuntu的apt-get源为国内镜像源的方法)