解决-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了.
系统: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了.
评论: