帮助文档
[root@omnimastertest download]# lsb_release --help
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.
Usage: lsb_release [OPTION]...
With no OPTION specified defaults to -v.
Options:
-v, --version
Display the version of the LSB specification against which the distribution is compliant.
-i, --id
Display the string id of the distributor.
-d, --description
Display the single line text description of the distribution.
-r, --release
Display the release number of the distribution.
-c, --codename
Display the codename according to the distribution release.
-a, --all
Display all of the above information.
-s, --short
Use short output format for information requested by other options (or version if none).
-h, --help
Display this message.
实战
1、查看系统版本信息
lsb_release -a
这个命令确实好用,但最小系统是没有该命令的,因此,补充一下命令安装:
(1)查询程序包
yum provides */lsb_release
(2)安装
yum install redhat-lsb-core-4.1-27.el7.centos.1.x86_64 -y
安装成功即可使用。