修改ubuntu 18.04的sources.list源為阿里或清華鏡像的方法
1. 備份源列表
Ubuntu缺省的配置的源并不是國內(nèi)的服務(wù)器,下載更新軟件都比較慢,本文介紹如何設(shè)置源列表,選擇比較快的源以節(jié)省下載時間。
# 首先備份源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
2. 打開sources.list文件修改
選擇合適的源,替換原文件的內(nèi)容,保存編輯好的文件, 以阿里云更新服務(wù)器為例(從實際測試上結(jié)果分析,個人認(rèn)為阿里云比網(wǎng)易和搜狐的服務(wù)器要快):
sudo vim /etc/apt/sources.list
3. 阿里云鏡像源-清華鏡像源
注意根據(jù)具體使用的Ubuntu的版本不同,將文本中trusty替換為下面對應(yīng)版本的字符串:
版本 | 版本號 | 代號 |
---|---|---|
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/ # 默認(rèn)注釋了源碼鏡像以提高 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 # 預(yù)發(fā)布軟件源,不建議啟用 # 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. 刷新列表,一定要執(zhí)行刷新
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential
5. 參考
到此這篇關(guān)于修改ubuntu 18.04的sources.list源為阿里或清華鏡像的方法的文章就介紹到這了,更多相關(guān)ubuntu18.04 sources.list內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- 在.NET中使用DiagnosticSource的方法
- Maven項目讀取resources文件路徑問題解決方案
- java(包括springboot)讀取resources下文件方式實現(xiàn)
- 怎么修改Ubuntu的源列表(source list)詳解
- ubuntu20.04 LTS系統(tǒng)默認(rèn)源sources.list文件的修改
- 解決SpringBoot打成jar運行后無法讀取resources里的文件問題
- 基于Springboot2.3訪問本地路徑下靜態(tài)資源的方法(解決報錯:Not allowed to load local resource)
- IDEA下因Lombok插件產(chǎn)生的Library source does not match the bytecode報錯問題及解決方法(親測可用)
- Source Insight基礎(chǔ)配置相關(guān)代碼實例
相關(guān)文章
Linux下查看binlog文件創(chuàng)建時間的命令
這篇文章主要介紹了Linux下查看binlog文件創(chuàng)建時間的命令,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-05-05詳解Linux 安裝 JDK、Tomcat 和 MySQL(圖文并茂)
本文會詳細(xì)介紹 Windows 上安裝虛擬機(jī)之后,如何在 Linux 中安裝 JDK、Tomcat 和 MySQL 的過程,有興趣的可以了解一下2017-08-08Linux雙網(wǎng)卡綁定實現(xiàn)負(fù)載均衡詳解
這篇文章主要為大家詳細(xì)介紹了Linux雙網(wǎng)卡綁定實現(xiàn)負(fù)載均衡,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-10-10Apache mod_rewrite中的REQUEST_URI使用實例
這篇文章主要介紹了Apache mod_rewrite中的REQUEST_URI使用實例,本文使用一個實例講解如何使用REQUEST_URI,需要的朋友可以參考下2015-01-01apache 開啟重定向 rewrite的實現(xiàn)方法
這篇文章主要介紹了apache 開啟重定向 rewrite的實現(xiàn)方法的相關(guān)資料,希望通過本文能幫助到大家,讓大家實現(xiàn)這樣的功能,需要的朋友可以參考下2017-10-10Apache tika 實現(xiàn)各種文檔內(nèi)容解析示例代碼
這篇文章主要介紹了Apache tika 實現(xiàn)各種文檔內(nèi)容解析,本文通過實例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧2024-07-07