[root@localhost ~]# cat /proc/version
Linux version 3.10.0-1160.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org)(gcc version 4.8.5 20150623 (Red Hat 4.8.5-44)(GCC))#1 SMP Mon Oct 19 16:18:59 UTC 2020[root@localhost ~]#
方式二:uname -a(获取内核信息)
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux[root@localhost ~]#