- 查看系统的发行版本信息,发现不存在这个命令
[root@localhost tomcat]# lsb_release -a
bash: lsb_release: command not found...
- 安装
yum install redhat-lsb -y
- 测试
[root@localhost tomcat]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.2.1511 (Core)
Release: 7.2.1511
Codename: Core
作者:信仰与初衷
链接:https://www.jianshu.com/p/498fab009c67
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
本文介绍了一种在CentOS系统中查询系统版本信息的方法。当lsb_release命令缺失时,可以通过安装redhat-lsb包来解决。安装后,使用lsb_release命令可以详细显示系统版本的详细信息,包括DistributorID、Description、Release和Codename等。
979

被折叠的 条评论
为什么被折叠?



