linux源配置:ubuntu、centos

1、ubuntu源配置

1)先查电脑版本型号:

matlab 复制代码
lsb_release -c

2)再编辑源更新,源要与上面型号对应

参考:https://midoq.github.io/2022/05/30/Ubuntu20-04更换国内镜像源/

matlab 复制代码
/etc/apt/sources.list

3)更新源配置

matlab 复制代码
apt update
apt upgrade

2、centos源配置

参考:

https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11iDH0bA

https://baijiahao.baidu.com/s?id=1748983525892204100\&wfr=spider\&for=pc

https://cloud.tencent.com/developer/article/2094265

1)下载

matlab 复制代码
cd /etc/yum.repos.d
##下载
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
##备份
mv CentOS-Base.repo CentOS-Base.repo.bak
mv CentOS7-Base-163.repo CentOS-Base.repo

2)更新

matlab 复制代码
#配置生效
yum makecache

#验证yum源
yum repolist

#更新包
yum clean all
yum update
相关推荐
皮小白38 分钟前
ubuntu开机检查磁盘失败进入应急模式如何修复
linux·运维·ubuntu
邂逅星河浪漫1 小时前
【CentOS】虚拟机网卡IP地址修改步骤
linux·运维·centos
hhwyqwqhhwy1 小时前
linux 驱动开发相关
linux·驱动开发
IT逆夜2 小时前
实现Yum本地仓库自动同步的完整方案(CentOS 7)
linux·运维·windows
S***26752 小时前
linux上redis升级
linux·运维·redis
赖small强2 小时前
【Linux 网络基础】Linux 平台 DHCP 运作原理与握手过程详解
linux·网络·dhcp
s***4534 小时前
Linux 下安装 Golang环境
linux·运维·golang
J***51685 小时前
Linux安装Redis以及Redis三种启动方式
linux·redis·bootstrap
4***17545 小时前
Linux 下安装 Golang环境
linux·运维·golang
Lenyiin5 小时前
《 Linux 修炼全景指南: 七 》 指尖下的利刃:深入理解 Vim 的高效世界
linux·运维·服务器·vim·lenyiin