查看linux系统版本命令

cat /proc/version

cat /etc/issue

uname -a

uname -r

lsb_release -a

cat /etc/redhat-release

file /bin/bash

示例:

[root@private ~]# cat /proc/version
Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Aug 22 21:09:27 UTC 2017
[root@private ~]# uname -a
Linux private.ca.sensetime.com 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@private ~]# uname -r
3.10.0-693.el7.x86_64
[root@private ~]# lsb_release -a
-bash: lsb_release: 未找到命令
[root@private ~]# cat /etc/issue
\S
Kernel \r on an \m

[root@private ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@private ~]# file /bin/bash
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=e1df4babc39e931279d37a050884e2b7b095ff39, stripped
[root@private ~]#

查看linux系统版本命令

上一篇:Linux C操作XML文件


下一篇:ubuntu20.04 安装jdk1.8.0