你的问题“怎样查看linux yum版”可能有几种理解,下面分别说明:
yum --version
或
rpm -qa | grep yum
如果提示 command not found,说明系统可能用的是 dnf(如 CentOS 8+、Rocky、AlmaLinux)。
cat /etc/redhat-release
或
hostnamectl
常见 yum 系系统:
yum list installed | grep 软件名
或
rpm -qi 软件名
yum repolist
或
ls /etc/yum.repos.d/
如果你指的是**“查看某个软件在 yum 源里的版本”**,可以用:
yum list 软件名
或
yum info 软件名
如果你能补充说明“yum版”具体指什么(系统版本 / yum版本 / 软件版本),我可以给你更精确的命令。