Ubuntu更换国内源(apt更换源)

Ubuntu更换国内源(apt更换源)网上的教程大部分都是文本命令行的方式更换国内源的 其实 Ubuntu18 04 也提供了图形界面的方式 这里主要讲图形界面的方式 毕竟点点鼠标就能完成的事儿谁愿意去输命令啊 而且还容易出错 当然这里也附上命令行的方式 可能很多人会问到底什么是源呢 其实吧它就像苹果和案桌的软件应用商店一样 为 Linux 用户提供软件下载及更新服务的 Linux 家族有三个软件源系统 yum 源 使用这种软件管理器的主要是 RedHat CentOSapt 源 使用这种软件管理器的主要是 UbuntuPacman 源 使用这种

网上的教程大部分都是文本命令行的方式更换国内源的,其实Ubuntu18.04也提供了图形界面的方式,这里主要讲图形界面的方式,毕竟点点鼠标就能完成的事儿谁愿意去输命令啊,而且还容易出错,当然这里也附上命令行的方式。

Ubuntu是外国人开发的系统,默认使用的也是国外的源,但是从国内翻^qiang下载国外的软件(插件)源太慢。其实国内也有很多的镜像源,比如说阿里源,网易源,清华园(源),中科大源。

一般这些源都是做为自己公司的业务服务的,比如说阿里的源,就是为阿里上百万台云服务器提供软件源的,你可以想像一下它的速度能不快吗?

这里实现切换阿里云源,别看截图很多,其实操作起来很简单滴

方式一:图形界面

第一步:打开软件和更新

Ubuntu更换国内源(apt更换源)

Ubuntu更换国内源(apt更换源)

第二步:设置163源

Ubuntu更换国内源(apt更换源)

这是原来的/etc/apt/sources.list配置文件

Ubuntu更换国内源(apt更换源)

选择其他站点

Ubuntu更换国内源(apt更换源)

选择阿里云源并保存

Ubuntu更换国内源(apt更换源)

关闭配置页面,即保存所有配置

Ubuntu更换国内源(apt更换源)

第三步:正在更新缓存

Ubuntu更换国内源(apt更换源)

更新过以后可以看下/etc/apt/sources.list配置文件

Ubuntu更换国内源(apt更换源)

可以发现sources.list配置文件已经修改成了阿里云源

Ubuntu更换国内源(apt更换源)

方式二:命令行

第一步:修改sources.list配置文件:

sudo vim /etc/apt/sources.list 

在文件最前面添加以下条目,保险起见,的操作之前做好备份

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 

第二步:更新缓存

执行下面的命令:

sudo apt-get update sudo apt-get upgrade 
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 https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse 

163源

deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse 

有关Ubuntu18.04的换源问题
Ubuntu18更换国内源(界面/文本方式)
Ubuntu 18.04更换为国内源




版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/212656.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月18日 下午7:34
下一篇 2026年3月18日 下午7:34


相关推荐

  • pytest skipif_白盒测试用例

    pytest skipif_白盒测试用例前言pytest.mark.skip可以标记无法在某些平台上运行的测试功能,或者您希望失败的测试功能Skip和xfail:处理那些不会成功的测试用例你可以对那些在某些特定平台上不能运行的测试用

    2022年7月28日
    7
  • SAP_FICO常用BAPI

    SAP_FICO常用BAPI1、检查创建凭证所需数据是否正确BAPI_ACC_DOCUMENT_CHECK;   2、创建凭证BAPI_ACC_DOCUMENT_POST。

    2022年7月24日
    27
  • Android RIL简介

    Android RIL简介1 RIL 全称 RadioInterfa Android 的无线接口层 负责提供电话服务 是上层应用和下层硬件 modem 之间的中间层 负责数据的可靠传输 AT 命令的发送以及响应的解析 2 RIL 的三部分 Android 的 RIL 驱动模块在 hardware ril 目录下 一共分 rild librild so 以及 librefrence ril so 三个部分 AT 调制解调器命令语

    2026年3月17日
    2
  • Deep Reinforcement Learning – 1. DDPG原理和算法

    Deep Reinforcement Learning – 1. DDPG原理和算法DeepReinforc 1 DDPG 原理和算法背景描述 DDPG 的定义和应用场景 DDPG 算法相关基本概念定义 DDPG 实现框架和算法 DDPG 对于 DPG 的关键改进下一篇以下用 RL 作为 Reinforcemen 的简称 背景描述概括来说 RL 要解决的问

    2026年3月20日
    2
  • 简单的udp攻击_udp flood攻击

    简单的udp攻击_udp flood攻击由于本人很菜,这个代码是改别人的.呵呵.可以在公司的局域网里搞搞坏,呵呵.我是在ubuntu8.04下的,需要gcc编译.这个也添加了广播,整个网段的人都能收到了#include#include#include#include//ip#include//tcp#include#includeunsignedshortip_su…

    2022年10月2日
    7
  • 嵌入式杂谈之中断向量表

    嵌入式杂谈之中断向量表虽说接触了好久的单片机或者说嵌入式开发 不过对于有些概念还是比较模糊 因此此系列将会从一些零碎的小知识点出发 慢慢的遍历整张嵌入式开发的地图 这次先来看一下中断向量表 至于为什么会提到中断向量表 主要是因为我自己在学习嵌入式 Linux 开发的过程中 好像学到的所有开始阶段都是要通过汇编完成的 好像没有汇编程序 整套系统就无法运行 那作为一套完整的系统 究竟从上电开始程序究竟是怎么运行起来的 发生

    2026年3月19日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号