Ubuntu16 apt-get更换为阿里源

1.备份系统自带源

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

2.修改/etc/apt/sources.list文件

  vim /etc/apt/sources.list

  加入如下内容

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

  

3.更新生效

  apt-get update

时间: 2024-10-10 01:13:33

Ubuntu16 apt-get更换为阿里源的相关文章

yum 找不到程序,yum更换国内阿里源

使用百度云服务器,发现百度yum源非常不稳定,果断采用阿里源,操作步骤如下: 一.备份 $ cd /etc/yum.repos.d/ $ mv baidu-bcm.repo baidu-bcm.repo.backup $ mv CentOS-Base.repo CentOS-Base.repo.backup 二.下载新的CentOS-Base.repo 到/etc/yum.repos.d/ ##查看Centos操作系统版本 $ cat /etc/redhat-release ##CentOS 5

ubuntu更换阿里源

网上应该可以找到很多关于ubuntu源的设置方法,但是如果不搞清楚就随便设置的话,不仅不能起到应有的效果,还会由于一些问题导致apt不可用. 最正确的更换源的方法应该如系统提示的: ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg## or do the same in user-data## b.) add sources in /etc/apt/sources.list.d## c.) make chan

Ubuntu17.04更换阿里源

命令:sudo vim /etc/apt/sources.list 阿里源: deb http://mirrors.aliyun.com/ubuntu/ zesty main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ zesty-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ zes

Ubuntu16.04 换阿里源

国内阿里源速度比较快,北京联通下载极快.更新也比较稳定 1.备份 cp /etc/apt/source.list /etc/apt/source.list.bak 2.编辑source文件 sudo vim /etc/apt/source.list (dd是删除整行,i是插入,注意sudo) 3.插入阿里源 deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties d

docker ubuntu容器更换阿里源(转)

问题:使用docker 利用下载的ubuntu镜像启动容器时,使用的源下载更新软件的速度较慢. 解决这个问题的方法是跟新ubuntu容器的源 示例:以ubuntu为基础镜像 启动一个名称为 test02的容器,并且开启shell交互(/bin/bash ) docker run -ti --name test02 ubuntu /bin/bash 用自带vi修改源 [email protected]:/# vi /etc/apt/sources.list 将原有内容删除,并替换为以下的阿里源 d

centos 7更换阿里源

转自 https://blog.csdn.net/jameshadoop/article/details/54881295 centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里 1.安装base reop源 cd /etc/yum.repos.d1接着备份旧的配置文件 sudo mv CentOS-Base.repo CentOS-Base.repo.bak1下载阿里源的文件 sudo wget -O CentOS-Base.repo http://mirro

树霉派更换软件镜像源

由于某些原因,国内访问树霉派官网的速度比较慢,所以我们有必要更换国内镜像源 1.备份源文件 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak 2.修改软件更新源 sudo nano /etc/apt/sources.list # 将第一行修改成中科大的软件源地址,「Ctrl

阿里源

deb http://mirrors.aliyun.com/ubuntu/ xenial main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main multiverse restrict

Ubuntu——切换阿里源

前言 Windows配套更新~ 步骤 更新之前不要忘记先备份,然后删除现有的直接粘贴最终结果即可 [email protected]:~# cd /etc/apt/ [email protected]:/etc/apt# cp -rvf sources.list sources.list.back 阿里源 原文地址:https://www.cnblogs.com/wangyang0210/p/12602281.html