上一篇 下一篇 分享链接 返回 返回顶部

Ubuntu18.04如何配置体系程序代码源

发布人:管理员 发布时间:2025-03-02 16:20 阅读量:134

Ubuntu18.04如何配置系统化应用领域软件源

Ubuntu18.04系统化如何对应用领域软件源进行配置呢?本文将针对此问题进行说明。

由于ubuntu默认使用国外的应用领域软件源,这边展示如何更换成国内的应用领域软件源,以便获取更好的体验。国内有很多ubuntu的镜像源,例如网易,阿里,清华大学等等,这边展示如何更换成清华大学的镜像源。

1.首先,对旧的镜像源进行备份

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

2.然后对镜像源配置文件进行修改

sudo vi /etc/apt/sources.list

在文件最前面添加以下内容:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted

universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted

universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main

restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main

restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main

restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main

restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main

restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main

restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main

restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main

restricted universe multiverse

3.修改完成后,保存文件。运行:

sudo apt-get update

sudo apt-get upgrade

配置完成。

说明:如果需要更换其他源,可以在网上搜索对应的源配置。

目录结构
全文