Debian system to replace the domestic source?

In the Debian system to replace with domestic sources, you can follow the steps below:

  1. Back up the source list file: First, back up the current source list file by opening a terminal and running the following command as an administrator:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  1. Edit the source listing file: Open the source listing file with a text editor such as nano or vim:
sudo nano /etc/apt/sources.list
  1. Replace with domestic source: Replace the contents of the file with the appropriate domestic source for your region. Here are some examples of commonly used domestic sources:
  • Aliyun source:
deb http://mirrors.aliyun.com/debian/ buster main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster main contrib non-free

deb http://mirrors.aliyun.com/debian-security/ buster/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security/ buster/updates main contrib non-free

deb http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster-updates main contrib non-free

deb http://mirrors.aliyun.com/debian/ buster-backports main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ buster-backports main contrib non-free
  • Tsinghua University source:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
  1. Save and close the file. Then, run the following command to update the package cache:
sudo apt update

Now, your Debian system has been replaced with a domestic source. Using a domestic source can speed up package downloads and provide a more stable connection. Note that depending on your region and specific needs, choose the appropriate source for you.

Guess you like

Origin blog.csdn.net/tiansyun/article/details/131651170