怎么修改Ubuntu的源列表(source list)詳解
簡介
Ubuntu缺省的配置的源并不是國內(nèi)的服務(wù)器,下載更新軟件都比較慢,本文介紹如何設(shè)置源列表,選擇比較快的源以節(jié)省下載時(shí)間。
配置步驟
1. 備份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
2. 選擇合適的源,替換原文件的內(nèi)容,保存編輯好的文件
以阿里云更新服務(wù)器為例(從實(shí)際測試上結(jié)果分析,個(gè)人認(rèn)為阿里云比網(wǎng)易和搜狐的服務(wù)器要快):
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
根據(jù)具體使用的Ubuntu的版本不同,將上述文本中XXXXX替換為下面對應(yīng)版本的字符串:
Utopic(14.10): utopic
Trusty(14.04): trusty
Precise(12.04): precise
Lucid(10.04): lucid
3. 刷新列表
sudo apt-get update
更新完畢后,再次安裝源時(shí),將從新服務(wù)器上下載源包。
備注:
Ubuntu 16.04 TLS版本鏡像源:
# 默認(rèn)注釋了源碼鏡像以提高 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 # 預(yù)發(fā)布軟件源,不建議啟用 # 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
總結(jié)
到此這篇關(guān)于怎么修改Ubuntu的源列表(source list)的文章就介紹到這了,更多相關(guān)修改Ubuntu源列表(source list)內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- 在.NET中使用DiagnosticSource的方法
- Maven項(xiàng)目讀取resources文件路徑問題解決方案
- java(包括springboot)讀取resources下文件方式實(shí)現(xiàn)
- ubuntu20.04 LTS系統(tǒng)默認(rèn)源sources.list文件的修改
- 修改ubuntu 18.04的sources.list源為阿里或清華鏡像的方法
- 解決SpringBoot打成jar運(yùn)行后無法讀取resources里的文件問題
- 基于Springboot2.3訪問本地路徑下靜態(tài)資源的方法(解決報(bào)錯(cuò):Not allowed to load local resource)
- IDEA下因Lombok插件產(chǎn)生的Library source does not match the bytecode報(bào)錯(cuò)問題及解決方法(親測可用)
- Source Insight基礎(chǔ)配置相關(guān)代碼實(shí)例
相關(guān)文章
Apeache啟動(dòng)不成功時(shí),用命令行檢測的方法
下面小編就為大家?guī)硪黄狝peache啟動(dòng)不成功時(shí),用命令行檢測的方法。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-09-09使用 bind 設(shè)置 DNS 服務(wù)器的方法
Bind9是一個(gè)強(qiáng)大的Linux下開放源代碼的DNS服務(wù)器軟件,這篇文章主要介紹了使用 bind 設(shè)置 DNS 服務(wù)器的方法,需要的朋友可以參考下2020-03-03使用Apache ab工具對Apache服務(wù)器進(jìn)行簡單的壓力測試
這篇文章主要介紹了使用Apache ab工具對Apache服務(wù)器進(jìn)行簡單的壓力測試的方法,文中還對如何查看當(dāng)前Apache的連接數(shù)的方法作了介紹,需要的朋友可以參考下2016-03-03