Ubuntu 更换国内源

简介: Ubuntu 更换国内源

编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份)

清华源

# 默认注释了源码镜像以提高 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


  • 执行命令
sudo apt-get update
sudo apt-get upgrade

阿里源

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-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed 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 https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

网易163源

deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
目录
相关文章
|
Ubuntu 开发工具
Ubuntu更换阿里云软件源
Ubuntu更换阿里云软件源
134302 0
|
Ubuntu PHP 开发工具
ubuntu 使用命令行更换国内源
ubuntu 使用命令行更换国内源
1000 35
|
Ubuntu 开发工具 Python
Ubuntu apt-get和pip国内源更换
Ubuntu apt-get和pip源更换 更新数据源为国内,是为了加速安装包的增加速度。 更换apt-get数据源 输入:sudo -s切换为root超级管理员; 执行命令:vim /etc/apt/sources.
11868 0
|
6月前
|
Ubuntu
ubuntu更换国内镜像源,下载增速
ubuntu更换国内镜像源,下载增速
|
Ubuntu Linux
【Ubuntu系统更换清华大学镜像源【详解】】
Ubuntu是一种基于Debian的Linux操作系统,它的软件仓库中包含了许多开源软件包。由于全球用户的数量众多,因此Ubuntu的官方镜像源可能会受到访问压力的影响而变得较慢。为了避免这种情况,我们可以将Ubuntu系统的镜像源切换到清华大学镜像源。本文将详细介绍如何在Ubuntu系统中更换清华大学镜像源。
1956 0
|
Ubuntu 索引
ubuntu更换apt源后依然搜索旧软件源下载失败问题
ubuntu更换apt源后依然搜索旧软件源下载失败问题
641 0
|
Ubuntu C语言
Ubuntu下更换gcc版本
Ubuntu下更换gcc版本
578 0
|
域名解析 Ubuntu Perl
Ubuntu 快速更换阿里源
本文主要给大家讲解如何为Ubuntu更换阿里源,通过以下四个步骤即可快速实现换源。
53486 3
Ubuntu 快速更换阿里源
|
Ubuntu Linux
Ubuntu 更换新 Logo :橙色+矩形 Logo|“Circle of Friends”主题更紧凑更统一
Ubuntu 更换新 Logo :橙色+矩形 Logo|“Circle of Friends”主题更紧凑更统一
192 0
Ubuntu 更换新 Logo :橙色+矩形 Logo|“Circle of Friends”主题更紧凑更统一