Detailed steps to replace software sources on Ubuntu:
-
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
-
Open the software source list file:
sudo nano /etc/apt/sources.list
-
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
-
Save and exit the software source list file.
-
Update the software source list:
sudo apt-get update