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

How to configure software mirror source in Ubuntu?

WBOY
Release: 2024-02-19 11:15:14
forward
1246 people have browsed it

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
    Copy after login
  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
    Copy after login
  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 
      Copy after login
    • 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 
      Copy after login
    • 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 
      Copy after login

    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
    Copy after login

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!

source:mryunwei.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template