引用:https://blog.csdn.net/u012308586/article/details/102953882



第一步、sudo  cp   /etc/apt/sources.list   /etc/apt/sources.list.bak 备份

  文件里内容大概是这样:

    



第二步、修改源文件source.list

    1. 终端执行命令:sudo  chmod  777  /etc/apt/sources.list更改文件权限使其可编辑;
    2. 执行命令:sudo  gedit   /etc/apt/sources.list打开文件进行编辑;
    3. 删除原来的文件内容,复制下面的任意一个到其中并保存(常用的是阿里源和清华源,推荐阿里源);

  阿里源:

 1 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
2
3 deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
4
5 deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
6
7 deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
8
9 deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
10
11 deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
12
13 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
14
15 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
16
17 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
18
19 deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

  清华源:

 1 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
2
3 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
4
5 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
6
7 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
8
9 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
10
11 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
12
13 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
14
15 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
16
17 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
18
19 deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

  163源:

 1 deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
2
3 deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
4
5 deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
6
7 deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
8
9 deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
10
11 deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
12
13 deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
14
15 deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
16
17 deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
18
19 deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse


第三步、更新源

  终端执行命令:sudo apt update更新软件列表,换源完成。



Ubuntu18.04换源的更多相关文章

  1. Ubuntu18.04 更换源

    在虚拟机新建一个Ubuntu18.04.1-live-server-amd64当做服务器 在安装软件时报错: slave@slave:~$ sudo -s[sudo] password for sla ...

  2. Ubuntu16.04换源(转)

    乌班图换源(ubuntu 16.04换阿里云源为例) 换成国内最快的阿里云源 第一步:备份原来的源文件 cd /etc/apt/ 1 2 然后会显示下面的源文件sources.list 输入命令 su ...

  3. Linux18.04换源等等等配置

    root用户 sudo passwd root 安装Tools 文件→其他位置→Vmware Tools→打开终端. 管理员权限→copy→tar -zxvf 文件名解压→打开vmware-tools ...

  4. Ubuntu16.04换源

    换成国内最快的阿里云源 第一步:备份原来的源文件 cd /etc/apt/ 然后会显示下面的源文件sources.list 输入命令 sudo cp sources.list sources.list ...

  5. Ubuntu16.04 换源(或者404 Not Found问题)

    当执行sudo apt-get update或者sudo apt-get install命令时,出现以下两个问题: “apt-get 404 Not Found Package Repository ...

  6. ubuntu 16.04换源 网易、搜狐、阿里云

    如何更改源可以在软件更新中选择源 使用如下命令更改(修改前先备份): [html] view plain copy print?sudo cp /etc/apt/source.list /etc/ap ...

  7. ubuntu 16.04 换源

    第一步:备份原来的源文件 cd /etc/apt/ 命令 cp sources.list sources.list.bak 将sources.list备份到sources.list.bak 第二步:替 ...

  8. Ubuntu18.04更新源

    一.备份/etc/apt/sources.list文件 cd /etc/apt sudo cp sources.list sources.list.old 二.选择国内常用的源 #阿里源 deb ht ...

  9. Ubuntu14.04 换源 阿里云

    sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup sudo vim /etc/apt/sources.list sudo apt-g ...

随机推荐

  1. windows下多Python环境指定pip安装模块到对应Python环境下

    专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿在windows下装了2套Python,一套是直接安装的Pytho ...

  2. PyQt(Python+Qt)学习随笔:QTableWidgetItem的位置相关方法

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 QTableWidgetItem项在QTableWidget中的位置包括三个属性来决定,就是表格部件 ...

  3. 第11.25节 Python正则表达式编译re.compile及正则对象使用

    一. 引言 在<第11.2节 Python 正则表达式支持函数概览>介绍了re模块的主要函数,在<第11.3节 Python正则表达式搜索支持函数search.match.fullm ...

  4. PyQt(Python+Qt)学习随笔:Mode/View中的枚举类 QItemSelectionModel.SelectionFlag取值及含义

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 以上取值可以通过或操作进行组合使用. 老猿Python,跟老猿学Python! 老猿Python博文 ...

  5. KafKa简介和利用docker配置kafka集群及开发环境

    KafKa的基本认识,写的很好的一篇博客:https://www.cnblogs.com/sujing/p/10960832.html 问题:1.kafka是什么?Kafka是一种高吞吐量的分布式发布 ...

  6. Java 中的语法糖,真甜。

    我把自己以往的文章汇总成为了 Github ,欢迎各位大佬 star https://github.com/crisxuan/bestJavaer 我们在日常开发中经常会使用到诸如泛型.自动拆箱和装箱 ...

  7. Java中的Reference类使用

    Java 2 平台引入了 java.lang.ref 包,这个包下面包含了几个Reference相关的类,Reference相关类将Java中的引用也映射成一个对象,这些类还提供了与垃圾收集器(gar ...

  8. Unity 3D里相机的平滑跟随(转)

    1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 public class ...

  9. Elasticsearch.Net

    今天使用Elasticsearch作开发,很简单的查询,就出现Elasticsearch.Net.UnexpectedElasticsearchClientException异常,看样子像是序列化的异 ...

  10. Shell变量、函数

    上篇文章初步认识了一下shell脚本及其简单的案例,下面我们再来讲一下shell的进击部分. 一.变量 1.常用系统变量:($HOME.$SHELL.$PWD.$USER) 2.自定义变量: 2.1. ...