帮助与文档

当前位置: 主页 > 系统相关 > 正文

Ubuntu18.04如何配置系统软件源

时间:2024/5/20 17:41:22   来源:米安网络   作者:云主机配置专家   点击:229次

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

配置完成。

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

版权保护: 本文「Ubuntu18.04如何配置系统软件源」由 云主机配置专家 原创,转载请保留链接: https://www.miandns.com/docs/system/847.html

联系客服

0312-5535754

微信公众号