国内有很多Ubuntu的镜像源,比如:阿里源、网易源等,还有很多教育网的源,比如:清华源、中科大源等。

这里以清华源为例讲解如何修改Ubuntu 18.04里面默认的源。

修改步骤

第一步:备份原始源文件,当然需要系统管理员权限操作

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

第二步:修改sources.list文件并添加国内源

vi /etc/apt/sources.list

第三步:注释原文件内的源(Ubuntu官方源)

#Ubuntu 官方源
deb http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse

第四步:在文件中添加清华源,保存并退出

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse

第五步:更新源

sudo apt-get update

第六步:到此完成国内源修改

其他源

阿里源:

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

网易源:

deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

中科大源:

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse

浙大源:

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

搜狐源:

deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

上海交大源:

deb http://ftp.sjtu.edu.cn/ubuntu/ dapper main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ dapper main multiverse restricted universe

北京理工大源:

deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

北京交大源:

deb http://mirror.bjtu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ raring-updates main multiverse restricted universe

ubuntu 把软件源修改为国内源的更多相关文章

  1. ubuntu 把软件源修改为国内源和更新

    1. 备份原始文件 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup 2. 修改文件并添加国内源 vi /etc/apt/sourc ...

  2. ubuntu 把软件源修改为国内源和更新(转载)

    1. 备份原始文件 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup 2. 修改文件并添加国内源 vi /etc/apt/sourc ...

  3. ubuntu 更新软件源

    ubuntu 更新软件源 修改文件sources.list 位于/etc/apt/sources.list,并备份原文件为sources.list.bak deb http://mirrors.163 ...

  4. [ubuntu]deb软件源

    虽然ubuntu的中国服务器的速度已经非常不错,但是难免,会有网络不畅的情形,所以修改软件源地址是一个基础的知识点. 修改ubuntu的软件源的方式有多种,一直是通过ubuntu软件中心提供的UI,还 ...

  5. ubuntu更换软件源

     ubuntu更换软件源 /etc/apt/source.list 163: deb http://mirrors.163.com/ubuntu/ trusty main restricted u ...

  6. 将pip源设置为国内源的方法

    需要将pip源设置为国内源,阿里源.豆瓣源.网易源等 - windows (1)打开文件资源管理器(文件夹地址栏中) (2)地址栏上面输入 %appdata% (3)在这里面新建一个文件夹 pip ( ...

  7. linux -- ubuntu 何为软件源

    新手学Ubuntu的时候,一般不知道什么是源,但源又是Ubuntu下常用到的东西.因此,本文就详细介绍一下Ubuntu 源. 什么是软件源? 源,在Ubuntu下,它相当于软件库,需要什么软件,只要记 ...

  8. Linux学习笔记——Ubuntu更新软件源

    0.前言     通过改动ubuntu软件源可提高apt命令下载安装软件的速度.     參考资料     [官方资料]--配置文件改动方法     [Ubuntu如何改动软件源地址]--使用ubun ...

  9. Ubuntu管理软件源

    在Ubuntu环境下,我们经常会使用apt-get(apt)命令下载各种软件,当所需软件在官方软件库中找不到时,我们需要添加第三方的软件源,或者由于位于海外的官方软件源下载速度过于感人时,需要添加国内 ...

随机推荐

  1. 【洛谷P3959】[NOIP2017] 宝藏

    宝藏 题目链接 首先,打了一个prim,得了45分 #include<iostream> #include<cstring> #include<cstdio> #i ...

  2. 【洛谷P2607】[ZJOI2008]骑士

    骑士 题目链接 这道题一看,似乎和舞会是一样的,然而它并没有保证是一棵树 但是,对于每个连通块,必有相同的点数和边数,这样的图一定是一棵树上加一条边 这条边一定回使图中形成一个环,这种图貌似叫“基环树 ...

  3. Android学习笔记_31_通过后台代码生成View对象以及动态加载XML布局文件到LinearLayout

    一.布局文件part.xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android&qu ...

  4. 使用fir.im和蒲公英进行测试的一些注意事项

    前言:使用fir.im和蒲公英进行测试的一些注意事项 最近公司的项目遇到了一个问题,有的用户的手机系统版本低于9.3高于9.0的存在崩溃的情况,8.x的系统的用户的有的界面的显示有问题(比如说图片严重 ...

  5. TensorFlow安装环境的误区

    安装py一定要注意安装的版本,我一开始安装的3.7版本的,现在还没有支持,另外,看清楚自己电脑是32位还是64位的

  6. 21.Shiro在springboot与vue前后端分离项目里的session管理

    1.前言 当决定前端与后端代码分开部署时,发现shiro自带的session不起作用了. 然后通过对请求head的分析,然后在网上查找一部分解决方案. 最终就是,登录成功之后,前端接收到后端传回来的s ...

  7. Android手机上抓包神器

    Packet Capture 一款依托安卓系统自身VPN来达到免Root抓取数据包的应用程序.Packet Capture一个使用SSL网络解密的 捕获数据包/网络嗅探 工具,虽然它的功能并不丰富,但 ...

  8. 【CodeForces 915 C】Permute Digits(思维+模拟)

    You are given two positive integer numbers a and b. Permute (change order) of the digits of a to con ...

  9. Tomcat服务器的介绍、安装配置

    [1] Tomcat服务器的介绍 1.是一个免费的.开饭源代码的Servlet服务器,目前非常流行. 2.Tomcat服务器是Apache软件基金会的一个顶级项目,由Apache.Sun等公司共同开发 ...

  10. 【前行&赛时总结】◇第2站&赛时·8◇ Atcoder ABC-109

    [第2站&赛时·8] ABC-109 把最后一题题意理解错了……在第二组数据卡了好久(然而并不知道是special judge)QwQ 最终AK,速度慢了一些 Rank:357 Rating: ...