修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法(修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法)
修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法
修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法1. 备份源列表
Ubuntu缺省的配置的源并不是国内的服务器,下载更新软件都比较慢,本文介绍如何设置源列表,选择比较快的源以节省下载时间。
# 首先备份源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
2. 打开sources.list文件修改
选择合适的源,替换原文件的内容,保存编辑好的文件, 以阿里云更新服务器为例(从实际测试上结果分析,个人认为阿里云比网易和搜狐的服务器要快):
sudo vim /etc/apt/sources.list
3. 阿里云镜像源-清华镜像源
注意根据具体使用的Ubuntu的版本不同,将文本中trusty替换为下面对应版本的字符串:
版本
版本号
代号
Lucid(10.04)
10.04
lucid
Precise(12.04): precise
12.04
precise
Trusty(14.04): trusty
14.04
trusty
Utopic(14.10): utopic
14.10
utopic
Ubuntu 16.04 TLS: xenial
16.04
xenial
Ubuntu 18.04 TLS: bionic
18.04
bionic
Ubuntu 18.04 TLS版本阿里云镜像源:
# https://opsx.alibaba.com/mirror deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse # 仿照清华镜像源,注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 # deb-src https://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
Ubuntu 18.04 TLS版本清华镜像源:
# https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 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
4. 刷新列表,一定要执行刷新
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential
5. 参考
修改ubuntu的sources.list源
修改ubuntu的sources.list源
如何修改Ubuntu的源列表(source list)
到此这篇关于修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法的文章就介绍到这了,更多相关ubuntu18.04 sources.list内容请搜索开心学习网以前的文章或继续浏览下面的相关文章希望大家以后多多支持开心学习网!
- ubuntu20.2安装mysql(Ubuntu 14.04下mysql安装配置教程)
- ubuntu中source指令(怎么修改Ubuntu的源列表source list详解)
- 阿里云ubuntu系统(阿里云ubuntu16.04如何搭建pptpd服务)
- ubuntu设置用户免密码(Ubuntu修改密码及密码复杂度策略设置方法)
- ubuntu安装php(在Ubuntu 18.04上安装PHP 7.3 7.2和7.0的方法)
- ubuntu下使用vscode(使用Vscode结合docker进行开发的详细过程)
- linux安装sqlserver 2008 r2(Ubuntu 下安装SQL Server教程)
- linux nginx搭建(Ubuntu使用nginx搭建webdav文件服务器的详细过程)
- ubuntu下vscode的使用教程(Vscode远程连接Ubuntu出错问题的解决方法)
- 如何激活ubunturoot账号(欧洲vps安装Ubuntu系统如何设置root登录)
- 树莓派3B+安装64位ubuntu系统和docker工具的操作步骤详解(树莓派3B+安装64位ubuntu系统和docker工具的操作步骤详解)
- 安装hbase1.1.2(Vmware + Ubuntu18.04 安装 Hbase 2.3.5的详细教程)
- linux时间同步ubuntu(在Ubuntu中使用NTP实现时间同步)
- ubuntu内核升级指定版本(Ubuntu12.04建立内核树实现过程详解)
- centos中docker安装部署(三分钟完成 ubuntu16.04初始化,Java,maven,docker环境的部署问题)
- 修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法(修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法)
- 探索中国神秘文字(探索中国神秘文字)
- 重温《蜗居》 宋思明选中海藻为红颜知己,纯属巧合,与爱无关(宋思明选中海藻为红颜知己)
- 越南旅游攻略(越南旅游攻略自由行)
- 成都旅游攻略(成都旅游攻略自由行最佳线路)
- 给儿童吃什么最好(给儿童吃什么最好消化)
- 杭州旅游攻略()
热门推荐
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9