引用: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. PyQt(Python+Qt)学习随笔:QTabWidget选项卡部件概述和属性介绍

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 一.概述 TabWidget选项卡组件是一个带一到多个选项卡栏和对应页面区域的组件,对应类QTabW ...

  2. PyQt(Python+Qt)学习随笔:QScrollArea滚动区域的scrollAreaWidgetContents、widget及setWidget等相关概念解释

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 在Designer中设计将一个lable放到滚动区域上,使用PyUIC生成代码后,可以看到除了QSc ...

  3. PyQt(Python+Qt)学习随笔:model/view架构中的两个标准模型QStandardItemModel和QFileSystemModel

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 一.PyQt中的标准模型 PyQt和Qt提供了两个标准模型QStandardItemModel和QF ...

  4. MySQL存储引擎:MyISAM和InnoDB的区别

    MyISAM和InnoDB的区别 定义 InnoDB:MySQL默认的事务型引擎,也是最重要和使用最广泛的存储引擎.它被设计成为大量的短期事务,短期事务大部分情况下是正常提交的,很少被回滚.InnoD ...

  5. sqli-labs lexx25-28a(各种过滤)

    less-25AND OR 过滤 less-25a基于Bool_GET_过滤AND/OR_数字型_盲注 less-26过滤了注释和空格的注入 less-26a过滤了空格和注释的盲注 less-27过滤 ...

  6. axios 封装 跨域 实现 (后端跨域配置白名单)

    1. 始vue化项目 vue init webpack deaxios # 使用脚手架创建项目 deaxios(项目名,随便取得) cd deaxios # 进入项目cnpm install npm ...

  7. springmvc中使用文件上传功能

    项目代码:https://github.com/PeiranZhang/springmvc-fileupload Servlet3.0之前使用文件上传功能 Servlet3.0之前需要使用common ...

  8. YT Downloader视频下载器

    简介 YT Downloader视频下载器是一款非常知名的视频下载器,支持下载YouTube,Facebook,Dailymotion,Vimeo,Metacafe等数百个视频网站的视频 截图介绍 小 ...

  9. Flink批处理读写Hive

    import org.apache.flink.table.api.*; import org.apache.flink.table.catalog.hive.HiveCatalog; /** * @ ...

  10. 装逼篇 | 抖音超火的九宫格视频是如何生成的,Python 告诉你答案

    1. 场景 如果你经常刷抖音和微信朋友圈,一定发现了最近九宫格短视频很火! 从朋友圈九宫格图片,到九宫格视频,相比传统的图片视频,前者似乎更有个性和逼格 除了传统的剪辑软件可以实现,是否有其他更加快捷 ...