Ubuntu 18.04 软件源修改成国内源

简介: Ubuntu 18.04 软件源修改成国内源

国内有很多Ubuntu的镜像源,包括阿里的、网易的,还有很多教育网的源,比如:清华源、中科大源。 我们这里以清华源为例讲解如何修改Ubuntu 18.04里面默认的源。

  1. 备份
    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  2. 修改sources.list文件
    vim /etc/apt/sources.list
## 在文件sources.list开头加
## 国内源清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
## 国内源结束
  1. 修改完成后,保存文件,运行下面的命令(不用管警告)
sudo apt-get update
sudo apt-get upgrade
  • 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
#deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src 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-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
  • 163源
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


相关文章
|
6月前
|
Ubuntu
百度搜索:蓝易云【如何将Ubuntu软件源切换到国内源?】
现在,你已经成功将Ubuntu软件源切换到国内源,将能够享受更快的下载速度和更稳定的软件包更新。
262 6
|
Ubuntu 开发工具
Ubuntu更换阿里云软件源
Ubuntu更换阿里云软件源
134294 0
|
6月前
|
Ubuntu
百度搜索:蓝易云【Ubuntu系统更新软件源教程】
现在,你已经成功更新了Ubuntu系统的软件源,系统中的软件包将是最新的版本。建议定期执行以上步骤,保持系统的安全性和稳定性。
52 0
|
Ubuntu 索引
ubuntu更换apt源后依然搜索旧软件源下载失败问题
ubuntu更换apt源后依然搜索旧软件源下载失败问题
640 0
|
Ubuntu
Ubuntu更换软件源
Ubuntu更换软件源
959 0
|
Ubuntu 开发工具 Perl
Ubuntu的一些软件源
Ubuntu的一些软件源
223 0
|
Ubuntu 开发工具
Ubuntu14.04阿里云软件源备份
更改源的方法:sudo vim /etc/apt/source.list # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.
2178 0
|
Ubuntu
1虚拟机下U盘或磁盘挂载,Ubuntu下的网络配置,图形化界面和命令界面之间的切换,软件源配置
 一设置磁盘挂载(磁盘默认挂载到了/media目录下了)    A:插入移动硬盘    B:对虚拟机进行设置(虚拟机—>可移动设备àtoshibaExternal USB 3.0(这个是我的移动硬盘插上去之后显示的一项)à连接)    有时候出现以下现象       C:检测存储设备名称    sudofdisk –
2046 0
|
Ubuntu Linux
给Ubuntu 13.04换源 软件源、更新源
http://www.linuxidc.com/Linux/2013-05/83902.htm 注意:更换软件源的时候有个 用户名 要特别注意一下 http://liuzhigong.blog.163.com/blog/static/17827237520121113103236820/
1856 0