解决-bash: lsb_release: command not found

今天想写个shell脚原本判断系统版本,没想到没有lsb_release,lsb_release是查看系统版本信息的工具.固然咱们也能够用其余的命令来解决,但这个问题仍是解决掉.
  系统:centos 5.5
1.先检查有没有lsb_release
[root @test ~]# lsb_release -r
-bash: lsb_release: command not found

2.使用yum安装lsb
yum install -y redhat-lsb

3.验证lsb是否已经安装上了
[root @test ~]# lsb_release -r Release:        5.5 能够看到已经成功安装上了lsb了.
相关文章
相关标签/搜索