20.04Ubuntu change source: improve software download speed and update efficiency

When using the Ubuntu operating system, a common optimization measure is to change the software source to improve software download speed and update efficiency. The software source refers to the server that stores the software package. By changing the software source, you can choose a server closer to your area, thereby speeding up the software download speed and reducing the waiting time during the update process. This article will introduce how to change the source operation in Ubuntu.

Why change the source?

By default, Ubuntu uses the official software repositories as the default sources, which are located all over the world. However, due to factors such as network delays and bandwidth limitations, the download speed of official software sources may be slow in some regions. By changing the software source, you can choose a mirror source that is closer to your region, so as to obtain faster download speed and smoother system update experience.

Two ways to change the source of Ubuntu: modify the software source file, change the source of the UI interface settings

1. Modify the software source file:

Step 1: Open the terminal to back up the source file

Before making any changes, it is recommended to back up the original software source files. That way, if something goes wrong during the change, you can revert to the original software source settings. To back up source files, you can use the following command:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup  

Step 2: Select the mirror source

Before choosing a new software source, you need to find a mirror source that suits you. Some common domestic mirror sources include Tsinghua University mirror source, Alibaba Cloud mirror source and Huawei mirror source, etc. These mirror sources are usually located all over the country and provide faster download speeds.

Depending on your selection, open the software source configuration file. The file can be opened with the following command:

sudo vim /etc/apt/sources.list

29114c32f20f414ebf25ac120a1b732b.png

In the opened file, you will see a series of deblines beginning with , denoting the different software sources. You can optionally comment out the original software sources and add new mirror sources. For example, if you choose to use the Tsinghua University mirror source, you can add the following line to the file

Mirror source of Tsinghua University:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse

 Image source of University of Science and Technology of China:

deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted
deb https://mirrors.ustc.edu.cn/ubuntu/ focal universe
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates universe
deb https://mirrors.ustc.edu.cn/ubuntu/ focal multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security universe
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security multiverse

 Ali cloud image source:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse

 

According to your Ubuntu version and the mirror source you need, you need to make corresponding modifications.

Step 3: Save and update the software source

After making changes to the software source files, save and exit the editor. In Vim, press Escthe key followed by a colon :followed by the following command to save changes and exit:

wq

To just save the file without exiting Vim, use the command:

w

Finally, run the following commands to update the software sources and apply the changes:

sudo apt update

The update process may take some time, depending on your internet speed and the size of the repository.

2. UI interface setting change source:

Step 1: Click the inverted triangle to open "Settings"

ca356d5bddd9499cbb82abc307474267.png

 

Step 2: In the opening interface, pull down to find "about" or "about", and open it.

c2e8dccffd5549fbbdbaed5bb479d6ff.png

 

Step 3: Find "Software Update" and open it.

63f384b5e64e4b5c948a3186df870aa2.png

Click the inverted triangle here, then select "Others", and find "China", or "china",

ce2e00c9a6b84cc3abaac3b5869f021c.png

de244412144243debabc358f5b1e65d6.png

91f58bc4e96b4fef9aa93b6c260b0b0e.png

 

Step 4: Select the software source you need here, and then click "Select Server"

ee193a40226e4e408fd256836799e22c.png

 Select "Reload" on this interface and wait (this process requires networking)

e8d62cbd25b643eb9e98bba908afc2e3.png

 

in conclusion:

By replacing the Ubuntu software source, you can increase the software download speed and update efficiency, and improve the system experience. Choosing a mirror source close to your region can reduce network delay and waiting time, and make software package acquisition faster and smoother.

Resourcing is a simple and effective optimization measure, whether in a home user or an enterprise environment. You can easily resource in an Ubuntu system by backing up your source files and following the steps above. Choose a mirror source suitable for your geographical location and network conditions, and enjoy faster software download speed and smoother system update experience.

Remember to be cautious when changing software sources, making sure to choose trustworthy and reliable mirror sources.

 

Guess you like

Origin blog.csdn.net/weixin_53000184/article/details/130782900