赞
踩
1.登录到linux服务器执行 lsb_release-a 命令,即可查看所有版本信息。
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版
注意:centos需要安准lsb。
(LSB是一套核心标准,它保证了LINUX发行版同LINUX应用程序之间的良好结合。一个二进制接口规范。)
[cai@localhost ~]$ lsb_release -a
LSB 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-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (Core)
Release: 7.6.1810
Codename: Core
2.查看Linux系统版本
(1)登录到linux执行 cat /etc/issue即可看到版本信息。
(我是在虚拟机中进行的测试)
(2)登录linux,在终端输入 cat /proc/version 。
[cai@localhost ~]$ cat /etc/issue
\S
Kernel \r on an \m
[cai@localhost ~]$ cat /proc/version
Linux version 3.10.0-957.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org)
(gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) )
#1 SMP Thu Nov 8 23:39:32 UTC 2018
3.查看Linux内核版本号。
uname -a
uname -r
[cai@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64
#1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[cai@localhost ~]$ uname -r
3.10.0-957.el7.x86_64
4.具体的版本号
[cai@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[cai@localhost ~]$ rpm -q redhat-release
package redhat-release is not installed
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。