在线镜像仓库
1、查操作系统版本
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镜像站-阿里云开发者社区
选择ubuntu操作系统
选择对应的版本,本文档使用18.04
4、编辑源列表文件
sudo vi /etc/apt/sources.list
5、将原来的内容删除,添加如下内容(阿里源镜像源)
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
即把这段替代刚打开那个文件,然后保存关闭。文章来源:https://www.toymoban.com/news/detail-815688.html
6.更新文章来源地址https://www.toymoban.com/news/detail-815688.html
sudo apt-get update
到了这里,关于Ubuntu18.04在线镜像仓库配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!