在線鏡像倉庫
1、查操作系統(tǒng)版本
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
2、原文件備份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
3、查鏡像源信息
登錄阿里yum倉庫
阿里巴巴開源鏡像站-OPSX鏡像站-阿里云開發(fā)者社區(qū)
選擇ubuntu操作系統(tǒng)
選擇對應(yīng)的版本,本文檔使用18.04
4、編輯源列表文件
sudo vi /etc/apt/sources.list
5、將原來的內(nèi)容刪除,添加如下內(nèi)容(阿里源鏡像源)
deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
即把這段替代剛打開那個文件,然后保存關(guān)閉。文章來源:http://www.zghlxwxcb.cn/news/detail-815688.html
6.更新文章來源地址http://www.zghlxwxcb.cn/news/detail-815688.html
sudo apt-get update
到了這里,關(guān)于Ubuntu18.04在線鏡像倉庫配置的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!