Ubuntu 更新源方法[通俗易懂]

Ubuntu 更新源方法[通俗易懂]阿里源:https://opsx.alibaba.com/mirrordebhttp://mirrors.aliyun.com/ubuntu/bionicmainrestricteduniversemultiversedeb-srchttp://mirrors.aliyun.com/ubuntu/bionicmainrestricteduniversemultiver…

大家好,又见面了,我是你们的朋友全栈君。

安装完Ubuntu系统之后,面临的最主要的一个问题就是将apt安装源进行更新,因为在国内直接利用Ubuntu默认的安装源下载安装包速度慢,并且有的时候软件版本也比较旧。今天小编对Ubuntu更新源进行介绍:(这里针对阿里源和清华源进行说明,具体源在第二部分)

第一:具体操作

  1. 复制阿里或者清华源

  2. 备份系统自带的源
    命令如下:

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.back

在这里插入图片描述
3. 打开/etc/apt/sources.list文件,将原来的内容删除,然后将上述复制的内容,粘贴上,保存。
这里用的是vim 进行操作,命令如下

sudo vi /etc/apt/sources.list

在这里插入图片描述
在这里插入图片描述
4. 更新,输入命令sudo apt-get update进行更新
在这里插入图片描述

当更新完成后会有如下显示:
在这里插入图片描述

第二: 首先是两个源的地址,以及源:

  1. 阿里源 :
    地址: https://opsx.alibaba.com/mirror
    源:

    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src 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-backports main restricted universe multiverse

  2. 清华源 :
    地址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

    源:
    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

大家可以用微信扫描下方的二维码,关注一下,大家一起讨论,学习。
在这里插入图片描述

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

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

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 搞懂设计模式-单例模式

    搞懂设计模式-单例模式

    2021年6月5日
    136
  • route命令linux详解,route命令详解与使用实例

    route命令linux详解,route命令详解与使用实例route命令用于在本地IP路由表中显示和修改条目。使用不带参数的ROUTE可以显示帮助。语法:route[-f][-p][command[destination][masknetmask][gateway][metric][ifinterface]参数说明:-f清除所有不是主路由(子网掩码为255.255.255.255的路由)、环回网络路由(目标为127.0.0.0,子网掩…

    2022年7月18日
    21
  • 列文伯格算法_最短路径matlab程序

    列文伯格算法_最短路径matlab程序  本系列文章主要介绍基于A*算法的路径规划的实现,并使用MATLAB进行仿真演示。  一、A*算法简介    A*(A-Star)算法是一种静态路网中求解最短路径最有效的直接搜索方法,也是解决许多搜索问题的有效算法。算法中的距离估算值与实际值越接近,最终搜索速度越快。    公式表示为:f(n)=g(n)+h(n),其中,f(n)是从初始状态经由状态n到目标状态的代价估计,g(n)是在状态空间中从初始状态到状态n的实际代价,h(n)是从状态n到目标状态的最佳路径的估计代价。

    2022年10月7日
    4
  • Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包

    Linux tomcat部署War包,Linux在Tomcat部署JavaWeb项目,Linux部署War包>>>>>©Copyright 蕃薯耀2017年3月6日http://fanshuyao.iteye.com/ 一、Linux快速部署War包操作,暂时是最简单的操作1、先关闭Tomcat/home/java/tomcat7/bin/shutdown.sh 2、进入War包存放目录(可以通过工具:SSHSecureShellClient把War传到Linux服务器)cd/home/projec

    2022年5月29日
    38
  • ip addr详解[通俗易懂]

    ip addr详解[通俗易懂]Windows上查看IP地址是ipconfig,Linux上是ifconfig,但是Linux上还有一个命令叫ipaddr可以查看IP地址。ipaddr1:lo:<LOOPBACK,UP,LOWER_UP>mtu65536qdiscnoqueuestateUNKNOWNqlen1link/loopback00:00:00:00:…

    2022年7月28日
    7
  • 文件路径超过系统限制_linux文件名长度限制

    文件路径超过系统限制_linux文件名长度限制Linux在Linux系统下,可以查看limits.h头文件里面有针对NAME和PATH的最大长度限制:#ifndef_LINUX_LIMITS_H#define_LINUX_LIMITS_H……#defineNAME_MAX255 /*#charsinafilename*/#definePATH_MAX4096 /*#charsinapathnameincludingnul*/……#en

    2022年8月30日
    4

发表回复

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

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