https://blog.csdn.net/xiangxianghehe/article/details/80112149

国内有很多Ubuntu的镜像源,包括阿里的、网易的,还有很多教育网的源,比如:清华源、中科大源。
我们这里以中科大的源为例讲解如何修改Ubuntu 18.04里面默认的源。
编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):

  1. ##中科大源
  2. deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
  3. deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
  4. deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  5. deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  6. deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  7. deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  8. deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  9. deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  10. deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  11. deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

然后执行命令:

  1. sudo apt-get update
  2. sudo apt-get upgrade

其他几份国内源如下:

阿里源

  1. deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  2. deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  4. deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  7. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  8. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  9. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

网易163源

  1. deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
  2. deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
  3. deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
  4. deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
  5. deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
  6. deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
  7. deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
  8. deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
  9. deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
  10. deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

清华源

  1. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  2. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  3. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  4. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  5. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  6. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  7. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  8. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  9. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  10. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse