Get the App
SLTechnology News&Howtos  ›  Servers  › 

Ubuntu 18.04 how to change the apt-get source

Shulou Source: shulou.com Published: 2022-06-02 09:36:53 10月04日 Update

What the editor wants to share with you this time is how to change the apt-get source of Ubuntu 18.04. the article is rich in content, and interested friends can learn about it. I hope you can get something after reading this article.

When using apt-get installation, it will be very slow, after changing the domestic source, you can solve this problem.

1. Backing up sources.list files

Sudo cp / etc/apt/sources.list / etc/apt/sources.list.bak

two。 Open the sources.list file

Sudo gedit / etc/apt/sources.list

3. Delete the original content and add the following

# Tsinghua Source

Deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiversedeb-src https: / / mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiversedeb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

# Ali Yunyuan

Deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

Deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

Deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Both of these sources can be used. I have tried both, and I feel that Ali Cloud Source is faster.

4. Update

Apt-get needs to be updated after saving the sources.list file.

Sudo apt-get update

After the update is completed, it can be used normally.

After reading this article on how to change apt-get feeds in Ubuntu 18.04, if you think the article is well written, you can share it with more people.

Tags: Content files articles updates Ali yes two interests rich content backup guys buddies feeling more faster articles speed questions Tsinghua Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia vpn MySQL macOS Shulou Technology