Detailed steps to replace software sources on Ubuntu

Detailed steps to replace software sources on Ubuntu:

  1. Open the terminal and enter the following command to back up the original software source list:

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

    sudo nano /etc/apt/sources.list
    
  3. Replace the original software source address with the domestic mirror source address, for example, replace the default http://archive.ubuntu.com/ubuntu/ with http://mirrors.aliyun.com/ubuntu/, or use the following Command to replace (no need to open the file):

    sudo sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
    
  4. Save and exit the software source list file.

  5. Update the software source list:

    sudo apt-get update
    

Guess you like

Origin blog.csdn.net/qq_43577613/article/details/130892494