龙空技术网

Ubuntu配置镜像源

大数据java架构师 212

前言:

此时各位老铁们对“ubuntu输入源”可能比较着重,各位老铁们都需要知道一些“ubuntu输入源”的相关文章。那么小编在网上网罗了一些关于“ubuntu输入源””的相关内容,希望小伙伴们能喜欢,姐妹们快快来了解一下吧!

前言

最近在整服务器这块,每次使用的时候,都需要配置国内镜像源,特意记录一下

1)备份之前的镜像源

mv /etc/apt/sources.list /etc/apt/sources.list.bak;

2)编辑源文件

/etc/apt/sources.list

3)设置下方的镜像源

#清华大学开源软件镜像站# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb  bionic main restricted universe multiverse# deb-src  bionic main restricted universe multiversedeb  bionic-updates main restricted universe multiverse# deb-src  bionic-updates main restricted universe multiversedeb  bionic-backports main restricted universe multiverse# deb-src  bionic-backports main restricted universe multiversedeb  bionic-security main restricted universe multiverse# deb-src  bionic-security main restricted universe multiverse# 预发布软件源,不建议启用# deb  bionic-proposed main restricted universe multiverse# deb-src  bionic-proposed main restricted universe multiverse
# 阿里云deb  trusty main restricted universe multiversedeb  trusty-security main restricted universe multiversedeb  trusty-updates main restricted universe multiversedeb  trusty-proposed main restricted universe multiversedeb  trusty-backports main restricted universe multiversedeb-src  trusty main restricted universe multiversedeb-src  trusty-security main restricted universe multiversedeb-src  trusty-updates main restricted universe multiversedeb-src  trusty-proposed main restricted universe multiversedeb-src  trusty-backports main restricted universe multiverse
# 中科大源deb  bionic main restricted universe multiversedeb-src  bionic main restricted universe multiversedeb  bionic-updates main restricted universe multiversedeb-src  bionic-updates main restricted universe multiversedeb  bionic-backports main restricted universe multiversedeb-src  bionic-backports main restricted universe multiversedeb  bionic-security main restricted universe multiversedeb-src  bionic-security main restricted universe multiversedeb  bionic-proposed main restricted universe multiversedeb-src  bionic-proposed main restricted universe multiverse

4)更新缓存和升级包

sudo apt updatesudo apt upgrade

标签: #ubuntu输入源