uname -r
:显示操作系统的发行版号
uname -a
:显示系统名、节点名称、操作系统的发行版号、操作系统版本、运行系统的机器 ID 号。 # Ubuntu系统ubuntu@VM-28-69-ubuntu:~$ uname -aLinux VM-28-69-ubuntu 3.13.0-86-generic #131-Ubuntu SMP Thu May 12 23:32:41 UTC 2016 i686 i686 i686 GNU/Linux# CentOS系统[root@VM_234_205_centos ~]# uname -aLinux VM_234_205_centos 3.10.0-514.21.1.el7.x86_64 #1 SMP Thu May 25 17:04:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
lsb_release
:LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息。
# CentOS系统# 安装yum -y install redhat-lsb # 使用[root@VM_245_18_centos home]# lsb_release -aLSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchDistributor ID: CentOSDescription: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511Codename: Core