Linux内核版本介绍

Posted by Epoch Blog on December 8, 2021

针对centos7以上,可以查看的内核版本命令

使用uname命令查看Linux内核版本

1
2
3
4
5
6
uname -srm
Linux 4.18.0-348.el8.x86_64 x86_64
4 - 内核版本.
18 - 主修订版本.
0-348 - 次要修订版本.
el8 - 补丁版本.

使用hostnamectl命令查看内核版本

hostnamectl实用程序是systemd的一部分,用于查询和更改系统主机名。 它还显示Linux发行版和内核版本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
hostnamectl
Static hostname: CentOS7.linuxrumen.com
Icon name: computer-vm
Chassis: vm
Machine ID: 20c27040135a4d46b2d3d07180f37303
Boot ID: 2f495af0684e4adfb34f0366f2567460
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.12.2.el7.x86_64
Architecture: x86-64

hostnamectl | grep -i kernel
Kernel: Linux 4.18.0-348.el8.x86_64

通过