美文网首页
更新Ubuntu软件下载地址

更新Ubuntu软件下载地址

作者: 让你变好的过程从来都不会很舒服 | 来源:发表于2021-07-12 16:26 被阅读0次

寻找国内镜像

https://mirrors.tuna.tsinghua.edu.cn/
镜像源:可以理解为提供下载软件的地方,比如安卓手机上可以下载软件的安卓市场、ios可以下载软件的AppStore
ubuntu清华大学镜像地址

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

备份Ubuntu默认的源地址:

1、切换到root用户


2、将更新源放入cources.list文件中



现在就将美国的镜像服务器地址改为中国的镜像地址了
3、更新源地址

sudo apt-get update

应用实例

案例说明:使用apt完成安装和卸载vim软件,并且查询vim软件的详细信息。(因为使用了镜像网站、所以很快)

1、sudo apt-get remove vim //删除
2、sudo apt-get install vim //安装
3、sudo apt-get show vim //获取软件信息

相关文章

网友评论

      本文标题:更新Ubuntu软件下载地址

      本文链接:https://www.haomeiwen.com/subject/evumultx.html