Ubuntu 18.04更换apt-get源
使用apt-get安装时,会很慢,更换了国内的源后,就可以解决这个问题了。
1. 备份sources.list文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2. 打开sources.list文件
sudo gedit /etc/apt/sources.list
3. 删除原内容,添加下列内容
#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
这两个源都可以用,我都试过,感觉阿里云源速度更快。
4. 更新
保存sources.list文件后需要更新apt-get。
sudo apt-get update
更新完成后就可以正常使用了。
Ubuntu 18.04更换apt-get源的更多相关文章
- Ubuntu 16.04 更换阿里云源
Ubuntu 16.04 更换阿里云源sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份sudo gedit /etc/apt/so ...
- win10 linux Ubuntu 18.04更换国内源
安装了win10的linux bash 版本为ubuntu 18.04 首先查询自己的linux版本信息 cat /etc/issue 然后对系统的镜像源文件进行备份,再修改镜像源文件/etc/a ...
- ubuntu 18.04更换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak //备份 sudo vim /etc/apt/sources.list //修改 ##阿 ...
- Ubuntu 18.04 更换阿里源
1.备份 sudo cp /etc/apt/source.list /etc/apa/source.list.bak 2.编辑 sudo vim /etc/apt/source.list 3.修改内容 ...
- Ubuntu 14.04 更换阿里云源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo ...
- Ubuntu 14.04 更换阿里云源[转]
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份 sudo vim /etc/apt/sources.list #修改 sudo ...
- Ubuntu 18.04 使用apt-get 华为源支持 arm64 鲲鹏处理器
网上搜的源,什么阿里云163等等的,都不支持arm64 执行以下代码,使用华为源 wget -O /etc/apt/sources.list https://repo.huaweicloud.com/ ...
- ubuntu 18.04 64bit下如何源码编译安装anbox
1. 准备工作 1.1 安装gcc 7.x版本 sudo apt-get install gcc-7 -y 1.2 安装依赖的库及其工具 sudo apt install build-essentia ...
- ubuntu 18.04用apt安装mysql-server
mysql5.7安装完成后普通用户不能进mysql 原因:root的plugin被修改成了auth_socket,用密码登陆的plugin应该是mysql_native_password,直接用roo ...
随机推荐
- Oracle创建函数例子
编写一个函数计算学生某一门课程在班级内的排名. 表结构如下: create or replace function fun_score_rank( p_in_stuid in number,--学号 ...
- 使用Pytorch在多GPU下保存和加载训练模型参数遇到的问题
最近使用Pytorch在学习一个深度学习项目,在模型保存和加载过程中遇到了问题,最终通过在网卡查找资料得已解决,故以此记之,以备忘却. 首先,是在使用多GPU进行模型训练的过程中,在保存模型参数时,应 ...
- Java技巧之——判断相等
变量值的判断是java中重要的一部分 通常我们判断两个值是否相等,使用的是两个等号 == 为了防止少写一个等号,造成无法挽回的失误,判断写为下面的格式 int a; 12==a; 原理是不能将任何东西 ...
- Light of future-冲刺集合
table th:nth-of-type(1) { width: 85px; } table th:nth-of-type(2){ width: 80px; } table th:nth-of-typ ...
- Spring MVC 笔记--配置基于JavaConfig
主要使用基于 JavaConfig 方式配置 配置 DispatcherServlet 通过继承抽象类AbstractAnnotationConfigDispatcherServletInitiali ...
- Linux学习66 运维安全-通信加密和解密技术入门
一.Linux Service and Security 1.OpenSSL(ssl/tls)协议 2.OpenSSH(ssh)协议 3.bind(dns) 4.web(http):httpd(apa ...
- MySql 存储过程分页。
use address;drop procedure if exists `proc_s_area_code`;delimiter // #告诉mysql解释器,该段命令是否已经结束了,mysql是否 ...
- Mac osx下误删了mach_kernel文件,如何找回
brew install xar 假设当前有一个 pkg 文件"filename.pkg",先使用以下命令解开 pkg: $ xar -xf filename.pkg 解压后发现其 ...
- Java第十二天,权限修饰符
Java当中权限修饰符共有四种.分别是public.protected.(default).private. 注:YSE代表可访问,NO代表不可访问. 同一个类 同一个包,非继承 不同的包,有继承 ...
- Python爬虫利器 cURL你用过吗?
hello,小伙伴们,今天给大家分享的开源项目是一个python爬虫利器,感兴趣的小伙伴看完这篇文章不妨去尝试一下,这个开源项目就是curlconverter,不知道小伙伴们分析完整个网站后去code ...