Ubuntu更换源(全)更换阿里云源 清华源 豆瓣源 腾讯源 sohu源 163源 西电 网易源
换源步骤
- 切换到源文件夹下
cp /etc/apt/
,查看文件ls
,里面有个sources.list文件; - 输入命令,
sudo cp sources.list sources.list.bak
,备份原文件,如果执行出错可恢复; - 打开sources.list文件
sudo gedit sources.list
,删除原代码,复制下面的阿里源代码进去,点击保存:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
- 更新源
sudo apt-get update
,修复损坏的软件包,尝试卸载出错的包,重新安装正确版本sudo apt-get -f install
, 最后更新软件sudo apt-get upgrade
其他常用源
1. 阿里云
2. 清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
3. 网易源
deb http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
4. 西电源
deb http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial main restricted universe multiverse
#deb-src http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial main restricted universe multiverse
deb http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-security main restricted universe multiverse
#deb-src http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-security main restricted universe multiverse
deb http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-updates main restricted universe multiverse
#deb-src http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-updates main restricted universe multiverse
#deb http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-backports main restricted universe multiverse
#deb-src http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-backports main restricted universe multiverse
#deb http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-proposed main restricted universe multiverse
#deb-src http://linux.xidian.edu.cn/mirrors/ubuntu/ xenial-proposed main restricted universe multiverse
5. 163
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
6. sohu
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
7. 腾讯源
Ubunu16.04 ,其他见传送门
deb http://mirrors.cloud.tencent.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-updates main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-proposed main restricted universe multiverse
#deb http://mirrors.cloud.tencent.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-updates main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-proposed main restricted universe multiverse
#deb-src http://mirrors.cloud.tencent.com/ubuntu/ xenial-backports main restricted universe multiverse
8. 豆瓣源
直接使用
pip install requests -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Ubuntu更换源(全)更换阿里云源 清华源 豆瓣源 腾讯源 sohu源 163源 西电 网易源相关推荐
- ubuntu 22.04 国内镜像阿里云/163源/清华大学/中科大--转--已验证
Ubuntu 22.04 LTS 五年长期支持版本,直到2027年4月 1- 备份原配置 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak ...
- docker 修改阿里镜像源_使用阿里云容器镜像服务托管私有Docker镜像
一个只用markdown语法编写文章的90后野路子Web架构师,每天都分享一些有用的知识点,欢迎关注- 前言 概述 本文主要讲解如何托管自己的Docker镜像到阿里云容器镜像服务ACR上,以及如何使用 ...
- Linux-将yum源设置为阿里云的镜像源(Centos7/6/5)
Linux-将yum源设置为阿里云的镜像源(Centos7/6/5) 1.备份原有的yum镜像源配置文件 mv /etc/yum.repo.d/Centos-Base.repo /etc/yum.re ...
- 阿里云基础设施事业部Java岗、腾讯TEG后台开发岗面经(4.22更新,拿到AT双Offer)
阿里云基础设施事业部Java岗.腾讯TEG后台开发岗面经
- 将linux镜像源改为阿里云镜像源
Ubuntu 首先编辑sources.list这个文件 vi /etc/apt/sources.list 把sources.list文件内容替换成如下 deb http://mirrors.aliyu ...
- redhat初始化yum源,使用阿里云yum源
本篇文章介绍redhat7使用国内阿里云yum安装源的方法,源地址使用的https://mirrors.aliyun.com/对应使用Centos7下的安装源. 在学习<Linux就该这么学&g ...
- 解决maven下载jar包速度慢的问题,将maven的下载源修改为阿里云源
由于maven中央仓库的服务器在国外,因此在国内使用maven下载jar包时可能会出现速度很慢的问题,对此,我们只需要将maven的下载源进行修改即可. 首先,找到maven的配置文件settings ...
- 搭建私有yum源仓库同步阿里云yum源到本地私有yum仓库
本地私有仓库搭建步骤: 1.安装nginx 2.在本机配置阿里云yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun ...
- Docker 的官方 yum 源切换为阿里云镜像源
Docker 的官方 yum 源切换为阿里云镜像源 1.备份原有的 Docker yum 源配置文件 sudo cp /etc/yum.repos.d/docker-ce.repo /etc/yum. ...
最新文章
- [Xcode 实际操作]六、媒体与动画-(3)使用CoreImage框架设置图片的单色效果
- windows结束线程的三种方式
- 在MonoTouch中正确而简单的使用 Sqlite 数据库
- 如何注册java程序为windows服务
- 技术做不下去就转管理?没那么容易
- [转载]GIF、JPEG 和 PNG的区别在哪里?
- 如何用jQuery获得select的值
- Android 系统(166)---GMO版本最近应用列表界面显示模糊的解决方案
- PhD Debate-11 预告 | 回顾与展望神经网络的后门攻击与防御
- sofa-jraft源码学习
- UnityVR-初识Unity-实践-制作一个工程场景
- IOS nonatomic 与 atomic 的区别
- t3计算机名带特殊符号,带特殊符号的网名,带特殊符号的网名
- Windows 11 的“此电脑”图标在哪里?
- 你还在为高速停车收费而烦恼吗?现已步入高速行ETC智慧交通时代
- 第2部分 字符串算法(提高篇)--第2章 KMP算法1469:似乎在梦中见过的样子
- 如何从其他平台快速引流到微信?
- 企业运用人工智能的案例_如何打造企业私域流量及企业微信
- IC封装原理及功能特性汇总
- 6000分“无聊大师”——张小龙