查看Linux操作系统版本信息

发布时间:2017-02-21 14:02:53
Linux 

正文

uname

[root@localhost ~]# uname
Linux
[root@localhost ~]# uname -r
2.6.32-642.13.1.el6.x86_64
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-642.13.1.el6.x86_64 #1 SMP Wed Jan 11 20:56:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/redhat-release

[root@localhost ~]# cat /etc/redhat-release
CentOS release 6.8 (Final)

cat /proc/version

当前centos 版本与redhat对应的版本的命令

[root@localhost ~]# cat /proc/version 
Linux version 2.6.32-642.13.1.el6.x86_64 (mockbuild@c1bm.rdu2.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Wed Jan 11 20:56:24 UTC 2017

cat /etc/issue

[root@localhost ~]# cat /etc/issue
CentOS release 6.8 (Final)
Kernel \r on an \m

cat /etc/debian_version

$ cat /etc/debian_version
8.9

参考