ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)

Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)

原创 Linux操作系统 作者:lhrbest 时间:2020-05-22 14:25:13 0 删除 编辑


Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)


1.备份

备份/etc/apt/sources.list文件

1
mv  /etc/apt/sources .list  /etc/apt/sourses .list.backup

2.新建

新建/etc/apt/sources.list文件并添加以下内容

在root管理员下

1
2
3
4
// 切换到管理员
sudo  su
// 新建文件并写入
vi  /etc/apt/sources .list

2.1 阿里源:

1
2
3
4
5
6
7
8
9
10
deb http: //mirrors .aliyun.com /ubuntu/  bionic main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-security main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-updates main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-proposed main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-backports main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-security main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-updates main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-proposed main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-backports main restricted universe multiverse

2.2 其它源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#清华源
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse
 
#中科大源
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse

 

2.3 扩展

Ubuntu 官方 (歐洲,國內較慢,無同步延遲) http://archive.ubuntu.com/ubuntu/

Ubuntu 官方中國 (目前是阿里云) http://cn.archive.ubuntu.com/ubuntu/

網易 (廣東廣州電信/聯通千兆雙線接入) http://mirrors.163.com/ubuntu/

搜狐 (山東聯通千兆接入) http://mirrors.sohu.com/ubuntu/

阿里云 (北京萬網/浙江杭州阿里云服務器雙線接入) http://mirrors.aliyun.com/ubuntu/

详情见:http://wiki.ubuntu.org.cn/模板:18.04source

3 更新

更改完成之后执行以下命令 

1
2
apt update
apt upgrade

4 参考

4.1  Ubuntu18.04更换国内源

4.2   apt-get 软件源文件格式以及ubuntu 18.04更换阿里源 (源内容格式的原理) 

4.3  ubuntu中文模板源




About Me

........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub、博客园、CSDN和个人微 信公众号( DB宝)上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文博客园地址: http://www.cnblogs.com/lhrbest

● 本文CSDN地址: https://blog.csdn.net/lihuarongaini

● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群号: 230161599 、618766405

● 微 信群:可加我微 信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友 646634621 ,注明添加缘由

● 于 2020-05-01 06:00 ~ 2020-05-30 24:00 在西安完成

● 最新修改时间:2020-05-01 06:00 ~ 2020-05-30 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

小麦苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麦苗出版的数据库类丛书http://blog.itpub.net/26736162/viewspace-2142121/

小麦苗OCP、OCM、高可用网络班http://blog.itpub.net/26736162/viewspace-2148098/

小麦苗腾讯课堂主页https://lhr.ke.qq.com/

........................................................................................................................

使用 微 信客户端扫描下面的二维码来关注小麦苗的微 信公众号( DB宝)及QQ群(DBA宝典)、添加小麦苗微 信, 学习最实用的数据库技术。

........................................................................................................................

欢迎与我联系

 

 



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2693744/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
全部评论
【QQ:646634621】【微信:lhrbestxh】【微信公众号:DB宝】【11g、12c OCM】【QQ群:230161599、618766405】【《数据库笔试面试宝典》作者】【OCP、OCM、高可用(RAC+DG+OGG)、MySQL培训班已开讲,只讲实用内容】

注册时间:2012-09-23

  • 博文量
    1491
  • 访问量
    8668375