lsb_release命令用来查看当前系统的发行版信息(prints certain LSB (Linux Standard Base) and Distribution information.)。有了这个命令就可以清楚的知道到底是RedHat的、还是别的发行版,还有具体的版本号,比如3.4还是5.4等等。有些系统上不一定安装了这个命令,可以通过查看/etc/issue文件得到发行版信息。
想查看一下系统内核信息,用lsb_release -a,提示不存在,安装一下:
yum install redhat-lsb
然后再lsb_release -a
LSB Version:
:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS Linux release 6.0 (Final)
Release: 6.0
Codename: Final
出来了,嘿~
Distributor ID: CentOS
Description: CentOS Linux release 6.0 (Final)
Release: 6.0
Codename: Final
出来了,嘿~