在 Ubuntu 中,更改下载源可以加快下载速度。以下是更改 Ubuntu 下载源的步骤:
备份之前的 sources.list
文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
修改 sources.list
文件,将文件中的内容替换为以下内容:
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
更新软件包列表:
sudo apt-get update
这样就可以使用阿里云的下载源了。
Ubuntu 更换国内源
【Ubuntu】3.配置下载源与更新