栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Ubuntu下更新阿里云软件源

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Ubuntu下更新阿里云软件源

Linux系列之更新阿里云软件源

  1.  备份软件源
    cd /etc/apt
    sudo cp sources.list sources.list.bak
  2.  修改源文件内容
    sudo vim sources.list
    vim下输入 :%d 删除文件所有内容,并替换成阿里源文件内容:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

esc->输入 :wq 保存退出。
注意: 修改源文件前先使用命令 lsb_release -c 查看系统代号,Ubuntu18.04系统代号为bionic,上方黄色标记文本可以看到。
Ubuntu 12.04 (LTS)代号为precise。
Ubuntu 14.04 (LTS)代号为trusty。
Ubuntu 16.04 (LTS)代号为xenial。
Ubuntu 20.04 (LTS)代号为focal。
3.   更新软件列表
sudo apt-get update     获取阿里云软件源提供的软件列表 。
sudo apt-get upgrade   更新软件。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/277071.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号