原文:https://blog.youkuaiyun.com/networken/article/details/79771212s
1.查看内核版本
[root@localhost ~]# uname -sr
Linux 4.15.11-1.el7.elrepo.x86_64
[root@localhost ~]# uname -a
Linux localhost.localdomain 4.15.11-1.el7.elrepo.x86_64 #1 SMP Mon Mar 19 11:46:06 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /proc/version
Linux version 4.15.11-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)) #1 SMP Mon Mar 19 11:46:06 EDT 2018
2.查看发行版本
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@localhost ~]# yum install -y redhat-lsb
[root@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.4.1708 (Core)
Release: 7.4.1708
Codename: Core
本文介绍了如何在Linux系统中查看当前运行的内核版本及系统发行版信息,包括使用`uname`命令获取内核版本详情和通过`cat /etc/redhat-release`以及安装`redhat-lsb`包来确定具体的Linux发行版。
4万+

被折叠的 条评论
为什么被折叠?



