[hai@myOS-1 ~]$ cat /proc/version
Linux version 3.10.0-1127.13.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org)(gcc version 4.8.5 20150623(Red Hat 4.8.5-39)(GCC))#1 SMP Tue Jun 23 15:46:38 UTC 2020
uname -a
[hai@myOS-1 ~]$ uname -a
Linux myOS-1 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
查看Linux系统版本
lsb_release -a (适用于所有的Linux发行版)
[hai@myOS-1 ~]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.8.2003 (Core)
Release: 7.8.2003
Codename: Core
cat /etc/redhat-release (只适合Redhat系的Linux:)
[hai@myOS-1 ~]$ cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
查看 Linux 内核版本cat /proc/version[hai@myOS-1 ~]$ cat /proc/versionLinux version 3.10.0-1127.13.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Jun 23 15:46:38 UTC 2020uname -a[hai@m