在Ubuntu系统中换源的教程如下:

  1. 打开终端。
  2. 备份原来的软件源列表文件:

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
  3. 编辑软件源列表文件:

    sudo nano /etc/apt/sources.list
  4. 将原来的软件源地址替换为你想要使用的新的源地址。常用的Ubuntu软件源地址有阿里云、清华大学、中科大等。

    例如,使用阿里云源可以将文件中的内容替换为以下内容:

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

    保存并关闭文件。

  5. 更新软件源列表:

    sudo apt-get update

现在,你已经成功将Ubuntu系统的软件源更换为你指定的源地址。换源后,系统将从新的源地址下载软件包和更新。


香港五网CN2网络云服务器链接:www.tsyvps.com

蓝易云香港五网CN2 GIA/GT精品网络服务器。拒绝绕路,拒绝不稳定。

最后修改:2023 年 08 月 01 日
如果觉得我的文章对你有用,请随意赞赏