Java教程

ubuntu 20.0.4 LTS 配置国内apt-get源

本文主要是介绍ubuntu 20.0.4 LTS 配置国内apt-get源,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
https://blog.csdn.net/weixin_39394526/article/details/87935449

Ubuntu 的软件源配置文件是 /etc/apt/sources.list
1\为避免出现问题,先备份

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

2\编辑sources.list文件替换内容

sudo vi /etc/apt/sources.list

 选择你的ubuntu版本:20.0.4 LTS

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

 

3\更新源

sudo apt-get update

完成

这篇关于ubuntu 20.0.4 LTS 配置国内apt-get源的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!