Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

View the Linux kernel version

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

You may need to know exactly which kernel version is running on the GNU / Linux operating system for a number of reasons. Maybe you're debugging hardware-related problems, or learning about new security vulnerabilities that affect the old kernel version, and you want to know if your kernel is easy.

Whatever the reason, it's easy to determine the Linux kernel version from the command line.

Use the `uname` command to view the Linux kernel version

The uname command displays multiple system information, including the Linux kernel architecture, name version, and release.

To find out which version of the Linux kernel is running on the system, enter the following command:

Uname-srm

Output result:

Linux 3.10.0-957.12.2.el7.x86_64 x86 revision 643-kernel version. 10-major revision. 0-957-minor revision. 12-patch version.

Use the `hostnamectl` command to view the kernel version

The hostnamectl utility is part of systemd and is used to query and change the system hostname. It also displays Linux distributions and kernel versions:

HostnamectlStatic hostname: CentOS7.linuxrumen.comIcon name: computer-vmChassis: vmMachine ID: 20c27040135a4d46b2d3d07180f37303Boot ID: 2f495af0684e4adfb34f0366f2567460Virtualization: vmwareOperating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7Kernel: Linux 3.10.0-957.12.2.el7.x86_64Architecture: x86-64

Use the following command to display only the current kernel version:

Hostnamectl | grep-I kernel

Confirm the kernel version by viewing the / proc/version file

The / proc directory contains virtual files that contain information about system memory, CPU kernel, mounted file systems, and so on. Information about the running kernel is stored in the / proc/version virtual file.

View the contents of the file with cat:

Cat / proc/version

The output is as follows:

Linux version 3.10.0-957.12.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)) 1 SMP Tue May 14 21:24:32 UTC 2019

Conclusion

We have shown you how to find the version of the Linux kernel running on your system from the command line. These commands apply to all popular Linux distributions, including Debian,Red Hat,Ubuntu,Arch Linux,Fedora,CentOS,Kali Linux,OpenSUSE,Linux Mint, etc.

Https://article.pchome.net/content-2101415.html

Http://www.51cto.com/it/news/2019/1009/15170.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report