Lanyiyun: Ubuntu 20.04 update Alibaba source tutorial

The tutorial for updating the Alibaba source of Ubuntu 20.04 system is as follows:

  1. Backup source list file:

    • Execute the following command in the terminal to back up the original source list file:

      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  2. Edit the source list file:

    • Execute the following command to edit the source list file:

      sudo vi /etc/apt/sources.list
  3. Add Alibaba source:

    • In the edited file, comment or delete the original source, and add the following Alibaba source mirror address (select according to the actual situation):

      # 阿里源镜像地址
      deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
      
      deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
      
      deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
      
      deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
      deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
      • Here, the mirror address of the Alibaba source is used to replace the original source address.
  4. Save and close the file.
  5. Update package list:

    • Execute the following command to update the package list:

      sudo apt update

Through the above steps, you can change the source of the Ubuntu 20.04 system to the Alibaba source mirror address. Make sure to back up the original source list file so you can restore it if needed. After updating the package list, you will be able to use Alibaba sources to download and install packages, speeding up downloads and providing better stability.

Guess you like

Origin blog.csdn.net/tiansyun/article/details/132945685
Recommended