Ubuntu apt更换为阿里源

apt源配置在 /etc/apt/sources.list ,首先备份一下:

1cd /etc/apt/ 2cp sources.list sources.list.bak

然后修改sources.list为:

1deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse 2deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse 3deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse 4deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse 5deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse 6deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse 7deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 8deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 9deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse 10deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse

注意:上面的内容中xenial 是我的ubuntu的版本号,你要替换成你的版本号。查看版本号方法为:

lsb_release -c

如:
在这里插入图片描述

最后更新一下软件列表

sudo apt-get update
点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

手写Java HashMap源码

HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22

Ubuntu更换snap国内镜像源

1.1进入apt的源文件列表所在文件夹   cd/etc/apt 1.2 备份sources.list源文件   sudocpsources.listsources.list\_back 1.3 进入阿里云镜像站,找到ubuntu的镜像列表    https://developer.aliyun.com/

2020年前端实用代码段,为你的工作保驾护航

有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )

ubuntu 16.04 跑 docker

Ubuntu的软件源配置文件是 /etc/apt/sources.list换国内的,不然会疯。下面是清华大学滴:默认注释了源码镜像以提高aptupdate速度,如有需要可自行取消注释debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/xenialmainrestric