1.备份

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

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

2.新建

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

在root管理员下

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

2.1 阿里源:

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 其它源

#清华源
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 更新

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

apt update
apt upgrade

4 参考

4.1 Ubuntu18.04更换国内源

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

4.3 ubuntu中文模板源

Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)的更多相关文章

  1. Ubuntu18.04更换国内源

    Ubuntu18.04更换国内源 Ubuntu本身的源使用的是国内的源,下载速度比较慢,不像CentOS一样yum安装的时候对镜像站点进项选择, 所以选择了更换成国内的源. 以下内容整合自网络 备份/ ...

  2. yum更换国内源、yum下载rpm包、源码包安装 使用介绍

    第5周第4次课(4月19日) 课程内容: 7.6 yum更换国内源7.7 yum下载rpm包7.8/7.9 源码包安装 7.6 yum更换国内源 当yum仓库的软件不好用时,例如很多yum源都是国外的 ...

  3. Ubuntu 18.04 LTS修改 国内源(以中科大源为例)

    国内有很多Ubuntu的镜像源,包括阿里的.网易的,还有很多教育网的源,比如:清华源.中科大源. 我们这里以中科大的源为例讲解如何修改Ubuntu 18.04里面默认的源. 可以进入这个链接进行下载: ...

  4. ubuntu 16.04 LTS 修改 国内源(以中科大源为例)

    国内有很多ubuntu的源,包括:网易源(这个之前用过,速度很快的),阿里源,还有很多教育网的源,如:清华源,中科大源. 这里要下载的是中科大ubuntu16.04的源列表,可以在这里获得:https ...

  5. win10 linux Ubuntu 18.04更换国内源

    安装了win10的linux bash 版本为ubuntu 18.04 首先查询自己的linux版本信息 cat /etc/issue   然后对系统的镜像源文件进行备份,再修改镜像源文件/etc/a ...

  6. yum更换国内源 yum下载rpm包 源码包安装

    7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 yum更换国内源 cd  /etc/yum.repo.d/ 删除源 rm -f   dvd.repo rm -f  C ...

  7. FreeBSD更换国内源(pkg源使用台湾源,中科大源备用)

    安装后第一件事就是更换国内源,不然后面安装桌面等,不用国内源下载太慢. 修改 pkg 源 创建用户级 pkg 源目录:mkdir -p /usr/local/etc/pkg/repos ee /usr ...

  8. ubuntu16.04更换成国内源

    一.首先使用自带的vi编辑器 安装完ubuntu后没有默认的root密码,如果要设置root密码需要进行如下步骤: 1 sudo passwd 2 连续输入两次新密码 二.vi编辑器下使用[backs ...

  9. Windows设置国内源阿里云镜像加速与离线安装pip包的方法

    Windows设置国内源阿里云镜像加速1.先在 windows “文件资源管理器” 地址栏 输入 %APPDATA% 按回车,打开程序自定义设置文件夹然后,创建名为 pip 的文件夹,用于存放 pip ...

随机推荐

  1. 阿里面试题BIO和NIO数量问题附答案和代码

    一.问题 BIO 和 NIO 作为 Server 端,当建立了 10 个连接时,分别产生多少个线程? 答案: 因为传统的 IO 也就是 BIO 是同步线程堵塞的,所以每个连接都要分配一个专用线程来处理 ...

  2. MariaDB第二章:基本增删改查

    MariaDB 数据类型 MariaDB数据类型可以分为数字,日期和时间以及字符串值. 使用数据类型的原则:够用就行, 尽量使用范围小的,而不用大的 常用的数据类型 整数:int, bit 小数:de ...

  3. c++入门之函数指针和函数对象

    函数指针可以方便我们调用函数,但采用函数对象,更能体现c++面向对象的程序特性.函数对象的本质:()运算符的重载.我们通过一段代码来感受函数指针和函数对象的使用: int AddFunc(int a, ...

  4. 关于H5页面中生成图片的两种方式!

    前言: 我们在做项目过程中,经常会遇到自定义生成一张图片并可以长按保存.长按保存图片在微信等浏览器中默认就有,那么对于生成图片的有哪些方式呢? 方法一: 利用canvas绘制图形,然后生成图片 代码如 ...

  5. Shell命令-文件及目录操作之ls、cd

    文件及目录操作 - ls.cd 1.ls:列出目录的内容及其内容属性信息 ls命令的功能说明 ls命令用于列出目录的内容及其内容属性信息. ls命令的语法格式 ls [OPTION]... [FILE ...

  6. Eclipse 设置背景色

    window -> preferences ->  General -> Editors -> Test Editors -> Background color 勾掉Sy ...

  7. Python——控件事件

    鼠标 键盘 窗口 按钮

  8. 数据降维之多维缩放MDS(Multiple Dimensional Scaling)

    网上看到关于数据降维的文章不少,介绍MDS的却极少,遂决定写一写. 考虑一个这样的问题.我们有n个样本,每个样本维度为m.我们的目标是用不同的新的k维向量(k<<m)替代原来的n个m维向量 ...

  9. 爬虫与request模块

    一.爬虫简介 1.介绍 网络爬虫(又被称为网页蜘蛛,网络机器人,在FOAF社区中间,更经常的称为网页追逐者),是一种按照一定的规则,自动地抓取万维网信息的程序或者脚本.另外一些不常使用的名字还有蚂蚁. ...

  10. 电脑重装系统后如何恢复 Mysql 数据库

    电脑重装系统后如何恢复 Mysql 数据库 一.[设置mysql的path] 比如:我的mysql在:D:\DataBase\mysql-5.7.13-winx64,可以在环境变量中重新新建一个环境变 ...