ubuntu中source指令(怎么修改Ubuntu的源列表source list详解)
类别:服务器 浏览量:1408
时间:2022-03-31 16:43:15 ubuntu中source指令
怎么修改Ubuntu的源列表source list详解简介
Ubuntu缺省的配置的源并不是国内的服务器,下载更新软件都比较慢,本文介绍如何设置源列表,选择比较快的源以节省下载时间。
配置步骤
1. 备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
2. 选择合适的源,替换原文件的内容,保存编辑好的文件
以阿里云更新服务器为例(从实际测试上结果分析,个人认为阿里云比网易和搜狐的服务器要快):
deb http://mirrors.aliyun.com/ubuntu/ XXXXX main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ XXXXX-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ XXXXX-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ XXXXX-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ XXXXX-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ XXXXX main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ XXXXX-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ XXXXX-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ XXXXX-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ XXXXX-backports main restricted universe multiverse
根据具体使用的Ubuntu的版本不同,将上述文本中XXXXX替换为下面对应版本的字符串:
Utopic(14.10): utopic
Trusty(14.04): trusty
Precise(12.04): precise
Lucid(10.04): lucid
3. 刷新列表
sudo apt-get update
更新完毕后,再次安装源时,将从新服务器上下载源包。
备注:
Ubuntu 16.04 TLS版本镜像源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
总结
到此这篇关于怎么修改Ubuntu的源列表(source list)的文章就介绍到这了,更多相关修改Ubuntu源列表(source list)内容请搜索开心学习网以前的文章或继续浏览下面的相关文章希望大家以后多多支持开心学习网!
您可能感兴趣
- ubuntu中source指令(怎么修改Ubuntu的源列表source list详解)
- ubuntu如何卸载clion(Ubuntu16.04安装clion全过程及步骤详解)
- linux时间同步ubuntu(在Ubuntu中使用NTP实现时间同步)
- ubuntu python3.7安装(详解Ubuntu16.04安装Python3.7及其pip3并切换为默认版本)
- ubuntu设置用户免密码(Ubuntu修改密码及密码复杂度策略设置方法)
- ubuntu ssh登录服务器(ubuntu开启SSH服务远程登录操作的实现)
- ubuntu内核升级指定版本(Ubuntu12.04建立内核树实现过程详解)
- ubuntu常用命令表(Ubuntu服务器常用命令汇总)
- ubuntu16.04开机默认root(新版ubuntu20.04 使用root用户登录系统的详细教程)
- ubuntu20.04开启ssh(详解Ubuntu20.04用Xshell通过SSH连接报错的服务问题)
- ubuntu下vscode的使用教程(Vscode远程连接Ubuntu出错问题的解决方法)
- ubuntu下使用vscode(使用Vscode结合docker进行开发的详细过程)
- 修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法(修改ubuntu 18.04的sources.list源为阿里或清华镜像的方法)
- ros必须在ubuntu安装吗(详解ubuntu20.04下CLion2020.1.3安装配置ROS过程说明)
- win10上装ubuntu系统(Windows 10 太难用如何定制你的 Ubuntu方法详解)
- ubuntu11.04安装ssh失败(Ubuntu20.04桌面安装及root权限开通和ssh安装详解)
- 今天要吃什么(今天要吃什么菜好)
- 网红直播可以赚很多钱吗(网红直播可以赚很多钱吗)
- 今天是什么日子(今天是什么日子有什么特殊意义吗)
- 这里输入关键词(怎么输入关键词搜索)
- 34岁的舒畅,就这样走到了末路,不知会不会后悔15年前的草率决定(就这样走到了末路)
- 不走心的古装造型 舒畅 毁容式 出演,萧蔷雷出新高度(不走心的古装造型)
热门推荐
- docker安装mysql后无法连接(Docker 安装 MySQL 并实现远程连接教程)
- python爬虫入门代码(python爬虫基础教程:requests库二代码实例)
- zabbix怎么监控容器(zabbix监控vmware exsi主机的图文步骤)
- mysql多核cpu利用(mysql CPU高负载问题排查)
- mvc编译时,让View中的错误提示
- nodejs部署上传文件(node.js使用express-fileupload中间件实现文件上传)
- json和xml比较与区别
- mysql演示事务提交(MySQL找出未提交事务的SQL实例浅析)
- 面试时不能说的离职理由
- react app框架(浅谈React原生APP更新)
排行榜
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9