Ubuntu设置科大镜像源

修改Ubuntu的镜像源为中科大镜像源
1、首先使用以下命令备份现有的镜像源:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、使用以下命令打开镜像源文件:
sudo vim /etc/apt/sources.list
3、在vim插入模式下使用以下内容替换掉原镜像源文件sources.list中的内容:
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
4. 激活源
sudo apt update
sudo apt upgrade
posted @ 2024-09-10 10:08  风影旋新月  阅读(239)  评论(0编辑  收藏  举报