Home  >  Article  >  Computer Tutorials  >  How to configure software mirror source in Ubuntu?

How to configure software mirror source in Ubuntu?

WBOY
WBOYforward
2024-02-19 11:15:141213browse

How to configure software mirror source in Ubuntu?

Configuring software mirror sources in Ubuntu is an effective way to increase download speeds and obtain software updates. The following are the configuration steps:

  1. Open Terminal: On the Ubuntu desktop, press
    Ctrl Alt T key combination can open the terminal.
  2. Back up the original software source configuration file (optional): If you want to keep the original software source configuration backup, you can execute the following command to backup
    /etc/apt/sources.list document:

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
  3. Edit the software source configuration file: Use a text editor (such as
    nano or
    vi) to open the software source configuration file:

    sudo nano /etc/apt/sources.list
  4. Choose a suitable mirror source: Choose a suitable mirror source based on your geographical location or personal preference. Here are some common Ubuntu image sources:

    • Alibaba Cloud Mirror Source: Add the following mirror source configuration to the file:

      deb 
      deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
      deb 
      deb 
    • Tsinghua University Mirror Source: Add the following mirror source configuration to the file:

      deb 
      deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
      deb 
      deb 
    • University of Science and Technology of China Mirror Source: Add the following mirror source configuration to the file:

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

    You can choose other mirror sources as needed.

  5. Saving and closing files: in
    nano In the editor, press
    Ctrl OSave the file and press
    Ctrl XClose the editor.
  6. Update the package list: Execute the following command to update the package list and use the new mirror source:

    sudo apt update

Now, your Ubuntu system has been configured with a new software image source. You can use the
apt or
apt-get command to install, update, or uninstall the software package, and obtain the software package from the selected mirror source.

The above is the detailed content of How to configure software mirror source in Ubuntu?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:mryunwei.com. If there is any infringement, please contact admin@php.cn delete