今天想判断系统版本,没想到没有lsb_release,lsb_release是查看系统版本信息的工具.当然我们也可以用其他的命令来解决,但这个问题还是解决掉.
系统:centos 6.4
1.先检查有没有lsb_release
[[email protected] ~]# lsb_release -r
-bash: lsb_release: command not found
2.使用yum安装lsb
[[email protected] ~]#yum install -y redhat-lsb
3.验证lsb是否已经安装上了
[[email protected] ~]# lsb_release -r
Release: 6.4
可以看到已经成功安装上了lsb了.
[[email protected] ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final
时间: 2024-11-07 20:45:43