Ubuntu 修改源命令行教程 - 提升软件安装速度
-
打开终端(Ctrl+Alt+T)。
-
备份原有的源列表文件。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
3. 编辑源列表文件。
sudo nano /etc/apt/sources.list
4. 将源地址修改为国内的镜像地址,例如:
默认的源地址
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ bionic 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
5. 保存修改并退出编辑器(Ctrl+X,然后按Y,最后按Enter)。
6. 更新源列表。
sudo apt-get update
7. 完成。
原文地址: https://www.cveoy.top/t/topic/gO5x 著作权归作者所有。请勿转载和采集!