解决 CentOS 中 lsb_release: command not found

centos7 运维 · systemofdown · 于 3年前 发布 · 4553 次阅读

在Linux经常用lsb_release 查看系统的版本。我在安装了CentOS7后,用此命令时,提示找不到。

安装

1. 用yum查看lsb_release 属于哪个程序包里

yum provides */lsb_release

2. 查询到属于redhat-lsb-core-4.1-27

redhat-lsb-core-4.1-27.el7.centos.1.x86_64 : LSB Core module support
Repo        : @base
Matched from:
Filename    : /usr/bin/lsb_release

3. 安装redhat-lsb-core

 yum install redhat-lsb-core

使用

执行lsb_release可以看到相关系统版本信息了。

lsb_release -a
共收到 0 条回复
没有找到数据。
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册