ubuntu apt-get更换国内源

1585364631
2023-02-17 / 0 评论 / 377 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2023年02月17日,已超过1151天没有更新,若内容或图片失效,请留言反馈。

AI摘要

本文介绍了Ubuntu系统更换国内软件源的方法。通过编辑`/etc/apt/sources.list`文件,将阿里云镜像源地址添加至首行,并执行`apt-get update`和`apt-get upgrade`命令更新缓存与系统,从而提升软件包的下载与更新速度。

ubuntu apt-get更换国内源

1.修改sources.list配置文件

vi /etc/apt/sources.list

在首行添加阿里云源

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

保存退出

2.更新缓存

apt-get update
apt-get upgrade
0

评论 (0)

取消