提示:文章写完后,目次可以主动生成,如何生成可参考右边的帮助文档
前言
安装好ubuntu20.04后,在下载软件等安装包的时候,速率特别的慢,为此就想着更换一下镜像源,以此来增加下载的速率!!!
下面是换源的具体流程!!!
提示:以下是本篇文章正文内容,下面案例可供参考
一、备份原来的源
- sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
复制代码 将从前的源备份一下,以防以后可以用的。
二、更换源
- sudo gedit /etc/apt/sources.list
复制代码 使用gedit打开文档,将下边的阿里源复制进去,然后点击保存关闭。
Ubuntu20.04(focal)阿里云软件源
- deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
复制代码 Ubuntu20.04清华软件源
- # 默认注释了源码镜像以提高 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
复制代码 三、更新软件(源)
更新软件列表
- sudo apt-get update
- //执行这个命令之后会访问源列表里的每个网址,并读取软件列表,更新软件源
复制代码 更新软件
- sudo apt-get upgrade
- //将本地已安装的软件与刚更新的软件列表里对应软件惊醒对比,如果发现已安装的软件版本太低就会提示更新
复制代码 总结
以上到这里就更换完软件源了,如有不足之处,请各人斧正!!!
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |