ubuntu更换源,ubuntu换源方法(Ubuntu20.04入坑指南--软件源更换)
关于【ubuntu更换源】,ubuntu换源方法,今天犇涌小编给您分享一下,如果对您有所帮助别忘了关注本站哦。
1、ubuntu更换源:Ubuntu20.04入坑指南--软件源更换
刚开始使用的时候,没有觉得哪里有问题,但是有时候通过命令行下载软件,更新软件,发现有的时候好慢好慢,为了解决,上网查找质料,发现可以通过更换软件源来解决这个问题。
我所推荐的软件源如下:
阿里云开源镜像站:
https://developer.aliyun.com/mirror/
清华大学:
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
具体方法如下:
Ubuntu系统中,软件源文件地址为:/etc/apt/sources.list
1.备份原来的源,将以前的源备份一下,以防以后可以用的。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.打开/etc/apt/sources.list文件,在前面添加如下条目,并保存。
sudo vim /etc/apt/sources.list(可将vim更换为自己熟悉的编辑器)
#添加阿里源deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse#添加清华源deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
3.更新
更新源
sudo apt-get update
如出现依赖问题,解决方式如下:
sudo apt-get -f install
更新软件:
sudo apt-get upgrade
附上网上找的各种源的地址:
1.企业源: 阿里云开源镜像站: http://mirrors.aliyun.com/ 搜狐开源镜像站:http://mirrors.sohu.com/ 网易开源镜像站:http://mirrors.163.com/
2.教育源: 重庆大学: http://mirrors.cqu.edu.cn/ 北京理工大学: http://mirror.bit.edu.cn (IPv4 only) http://mirror.bit6.edu.cn (IPv6 only) 北京交通大学: http://mirror.bjtu.edu.cn (IPv4 only) http://mirror6.bjtu.edu.cn (IPv6 only) http://debian.bjtu.edu.cn (IPv4+IPv6) 兰州大学:http://mirror.lzu.edu.cn/ 厦门大学:http://mirrors.xmu.edu.cn/ 上海交通大学: http://ftp.sjtu.edu.cn/ (IPv4 only) http://ftp6.sjtu.edu.cn (IPv6 only) 清华大学: http://mirrors.tuna.tsinghua.edu.cn/ (IPv4+IPv6) http://mirrors.6.tuna.tsinghua.edu.cn/ (IPv6 only) http://mirrors.4.tuna.tsinghua.edu.cn/ (IPv4 only) 天津大学:http://mirror.tju.edu.cn/ 中国科学技术大学: http://mirrors.ustc.edu.cn/ (IPv4+IPv6) http://mirrors4.ustc.edu.cn/ http://mirrors6.ustc.edu.cn/ 西南大学:http://linux.swu.edu.cn/swudownload/Distributions/ 东北大学: http://mirror.neu.edu.cn/ (IPv4 only) http://mirror.neu6.edu.cn/ (IPv6 only) 电子科技大学:http://ubuntu.uestc.edu.cn/ 青岛大学:http://mirror.qdu.edu.cn/ 开源中国社区 http://mirrors.oss.org.cn/ 大连东软信息学院 http://mirrors.neusoft.edu.cn/ 华中科技大学 http://mirrors.hust.edu.cn/ 中山大学 http://mirrors.sysu.edu.cn/ 清华大学学生网管会 http://mirrors.tuna.tsinghua.edu.cn/ 浙江大学 http://mirrors.zju.edu.cn/web/
台湾淡江大学 http://ftp.tku.edu.tw/Linux/
Linux运维派开源镜像 http://mirrors.skyshe.cn/
各种源原始地址:https://www.cnblogs.com/Hi-blog/p/5954230.html
2、ubuntu更换源,ubuntu换源方法
Ubuntu安装后默认的官方源是美国的服务器,但是美国服务器在国内安装软件等会有较大的限制。所以我们需要将默认的源切换为国内源。一般来说,常用的国内源有阿里源(这是中国官方源)、网易源和搜狐源等等。除此之外,还有高校源,比如清华、中科大以及浙大等等。如果是在校学生,那么换成自己学校内部的源,更新和安装软件的速度会很快。如果是非校园网络,那么最推荐的就是阿里源。不同版本的Ubuntu系统的源列表不相同,在这里我只列举Ubuntu 14.04和Ubuntu 16.04两种系统的源列表。
1. 更换源的两种方式(1)打开系统设置选择,software&updates,如下:
然后在跳出来的框中点击选择”Download from:“选项
再点击other选项会出现一个choose a download server框并选择China,里面有很多国内服务器可选择。
(2)在sources.list文件中手动更改源,即将对应源列表中的代码复制到sources.list文件中,过程如下:
<1> 打开终端,通过cd指令进入sources.list文件所在目录。
$ cd /etc/apt
<2> 将原sources.list文件拷贝做备份,可以进入/etc/apt目录下看到有一个sources.list.bak文件。$ sudo cp sources.list sources.list.bak
<3> 通过gedit指令对sources.list进行编辑(也可以用vim指令),并将sources.list文件中的内容全选删除,再把对应的源列表的内容复制到文件中。
$ sudo gedit sources.list
<4>访问源列表里的网址,并读取软件列表,然后更新保存在本地电脑,换源结束。
$ sudo apt-get update
2. Ubuntu 14.04常用的源列表(1)阿里云源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
(2)网易源
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
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
(3)教育网之浙大源
deb http://mirrors.zju.edu.cn/ubuntu/ trusty main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ trusty-security main multiverse restricted universe
deb http://mirrors.zju.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ trusty main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ trusty-security main multiverse restricted universe
deb-src http://mirrors.zju.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe
(4)教育网之中科大源
deb http://debian.ustc.edu.cn/ubuntu/ trusty main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ trusty-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ trusty-updates main multiverse restricted universe
(5)教育网之清华源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
3. Ubuntu 16.04常用的源列表(1)阿里云源
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-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports 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-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
(2)网易源
deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse
(3)教育网之浙大源
deb http://mirrors.zju.edu.cn/ubuntu xenial main universe restricted multiverse
deb http://mirrors.zju.edu.cn/ubuntu xenial-security main universe restricted multiverse
deb http://mirrors.zju.edu.cn/ubuntu xenial-updates main universe restricted multiverse
deb http://mirrors.zju.edu.cn/ubuntu xenial-proposed main universe restricted multiverse
deb http://mirrors.zju.edu.cn/ubuntu xenial-backports main universe restricted multiverse
deb-src http://mirrors.zju.edu.cn/ubuntu xenial main universe restricted multiverse
deb-src http://mirrors.zju.edu.cn/ubuntu xenial-security main universe restricted multiverse
deb-src http://mirrors.zju.edu.cn/ubuntu xenial-updates main universe restricted multiverse
deb-src http://mirrors.zju.edu.cn/ubuntu xenial-proposed main universe restricted multiverse
deb-src http://mirrors.zju.edu.cn/ubuntu xenial-backports main universe restricted multiverse
(4)教育网之中科大源
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
(5)教育网之清华源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe
本文关键词:ubuntu18.04更换源,ubuntu20.10换源,ubuntu20更换源,ubuntu 20.04更换源,ubuntu 更换源。这就是关于《ubuntu更换源,ubuntu换源方法(Ubuntu20.04入坑指南--软件源更换)》的所有内容,希望对您能有所帮助!更多的知识请继续关注《犇涌向乾》百科知识网站:http://www.029ztxx.com!
版权声明: 本站仅提供信息存储空间服务,旨在传递更多信息,不拥有所有权,不承担相关法律责任,不代表本网赞同其观点和对其真实性负责。如因作品内容、版权和其它问题需要同本网联系的,请发送邮件至 举报,一经查实,本站将立刻删除。