当前位置:   article > 正文

Ubuntu20.04 更换镜像源步骤_ubuntu20.04换源

ubuntu20.04换源

1) 备份---sudo cp /etc/apt/sources.list /etc/apt/sources.list.back

2)修改源---sudo vim /etc/apt/sources.list

换源:推荐清华或者阿里云的源(根据自己的网去尝试,选择最快的一个):清华源地址,选择Ubuntu版本(查看ubuntu版本命令:cat /etc/issue)并复制源内容,覆盖sources.list文件原来的内容

在Vim普通模式下全部删除:按esc键后,先按gg(到达顶部),然后dG(区分大小写

阿里镜像源ubuntu 20.04(focal)

  1. deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  2. deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  4. deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  7. # deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  8. # deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

清华镜像源ubuntu 20.04(focal)

  1. # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
  2. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
  3. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
  4. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
  5. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
  6. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
  7. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
  8. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
  9. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
  10. # 预发布软件源,不建议启用
  11. # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
  12. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

(在vim里面进行操作,刚开始进入是普通模式,按"i"进入插入模式,编辑完之后,按”esc”退出进入到普通模式,按Shift+:(一起按),再按wq+回车,完成保存并退出操作)

选择直接编辑即可

3) 更新---sudo apt-get update

常见问题解决:

1、仓库 “http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu focal Release” 没有 Release 文件。

N: 无法安全地用该源进行更新,所以默认禁用该源。

解决步骤:

1)打开软件“软件与更新”

2)在其他软件界面

3)将对应项取消然后关闭,会自动更新一下

4)sudo apt-get update

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/224592
推荐阅读
相关标签
  

闽ICP备14008679号