步骤

1. 备份

  1. sudo cp/etc/apt/sources.list /etc/apt/sources.list.bak

2. 修改

  1. sudo vim/etc/apt/sources.list

3. 镜像源

清华源

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

阿里云源

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

4. 更新源

  1. sudo apt-get update

5. 更新软件

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