在 Debian 系统中,通常不会使用 yum,因为 yum 是 Red Hat 系列(如 CentOS、RHEL、Fedora 旧版) 的包管理工具,而 Debian 使用的是 apt。不过你问的是“区别在哪”,下面从几个维度对比说明:
.deb 包格式.rpm 包格式dnf| 工具 | 包格式 | 仓库类型 |
|---|---|---|
| apt | .deb |
apt仓库 |
| yum | .rpm |
yum仓库 |
| 功能 | apt(Debian) | yum(Red Hat) |
|---|---|---|
| 更新软件列表 | apt update |
yum makecache |
| 安装软件 | apt install xxx |
yum install xxx |
| 卸载软件 | apt remove xxx |
yum remove xxx |
| 升级系统 | apt upgrade |
yum update |
| 搜索软件 | apt search xxx |
yum search xxx |
/etc/apt/sources.list/etc/apt/sources.list.d//etc/yum.repos.d/*.repo理论上可以装,但不推荐:
aptapt 是 Debian 系的包管理器,yum 是 Red Hat 系的包管理器,两者不通用,Debian 只用 apt。
如果你愿意,我也可以帮你写一份 apt 常用命令速查表。