Ubuntu的软件源设置文件位于 `/etc/apt/sources.list`,我们可以通过修改该文件来
更换 镜像源。
以下是
更换为阿里云
镜像源的步骤:
1. 备份原有的软件源设置文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2. 使用文本编辑器打开 `/etc/apt/sources.list` 文件
sudo nano /etc/apt/sources.list
3. 将原有的内容注释掉,添加阿里云
镜像源的内容
# 以下为原有的内容,注释掉
# deb http://archive.
ubuntu.com/
ubuntubionic main restricted universe multiverse
# deb-src http://archive.
ubuntu.com/
ubuntubionic main restricted universe multiverse
# deb http://archive.
ubuntu.com/
ubuntubionic-updates main restricted universe multiverse
# deb-src http://archive.
ubuntu.com/
ubuntubionic-updates main restricted universe multiverse
# deb http://archive.
ubuntu.com/
ubuntubionic-backports main restricted universe multiverse
# deb-src http://archive.
ubuntu.com/
ubuntubionic-backports main restricted universe multiverse
# deb http://archive.
ubuntu.com/
ubuntubionic-security main restricted universe multiverse
# deb-src http://archive.
ubuntu.com/
ubuntubionic-security main restricted universe multiverse
# 以下为阿里云
镜像源的内容
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-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-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/
ubuntu/ bionic-backports 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
4. 保存并退出编辑器
按下 `Ctrl + X`,然后按下 `Y` 确认保存。
5. 更新软件源
sudo apt update
现在,你已经成功
更换 Ubuntu的
镜像源了。
到此这篇Ubuntu镜像源(ubuntu镜像源怎么下载)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!版权声明:
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权、违法违规、事实不符,请将相关资料发送至xkadmin@xkablog.com进行投诉反馈,一经查实,立即处理!
转载请注明出处,原文链接:https://www.xkablog.com/bcyy/18227.html