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)