Ubuntu包管理自带的源, 下载速度很慢, 更换为国内源
- 备份Ubuntu自带的源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
- 创建源文件
vim /etc/apt/sources.list
- 查看Ubuntu版本
lsb_release -c
-
更换为国内源(阿里源)
注意: 需要将
bionic替换为实际的Ubuntu版本号
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
- 激活源
sudo apt update
本文介绍如何将Ubuntu默认的软件包源更换为国内阿里云源,包括备份原源配置、更改源地址并更新软件包列表等步骤。
8103

被折叠的 条评论
为什么被折叠?



