In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to use commands to view the Linux kernel version". In daily operation, I believe many people have doubts about how to use commands to view the Linux kernel version. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to use commands to view the Linux kernel version". Next, please follow the editor to study!
How to find the Linux kernel version
At the time of this writing, I was using Ubuntu 18.04. But these commands are generic and can be used on Fedora,Debian, CentOS,SUSE Linux, or any other Linux distribution.
Use the uname command to find the Linux kernel
Uname is a Linux command used to get system information. You can also use it to determine whether you are using a 32-bit or 64-bit system.
Open a terminal and use the following command:
[linuxmi@linux:~/www.linuxprobe.com] $uname-r
The output will look similar to the following:
5.3.0-28-generic
This means that you are running Linux kernel 5.3.0-28, or more generally, you are running Linux kernel version 5.3.
But what do other numbers mean here? Let me explain to you:
5-Kernel version
3-Major revision
0-minor revision
28-error repair
The generic- is a version-specific string. For Ubuntu, this means that I am using the desktop version. For the Ubuntu server version, it should be server.
You can also use the uname command with the-an option. If necessary, this will provide more system information.
[linuxmi@linux:~/www.linuxprobe.com] $uname-a
The output will look similar to the following:
Linux linux 5.3.0-28-generic # 30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86 "64 GNU/Linux
Let me explain the output and give it a meaning:
Linux-Kernel name. If you run the same command on BSD or macOS, the results will be different.
Linux-Hostnam
5.3.0-28-generic-kernel version (we just talked about that)
# 30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020-this means that Ubuntu compiled 5.3.0-28-generic 30 times. The final compilation timestamp is also there.
X86room64-Machine Architecture
X86room64-processor architecture
X86room64-operating system architecture (you can run 32-bit OS on 64-bit processors)
GNU/Linux-operating system (no, it does not display the release name)
2. Use / proc/version file to find the Linux kernel
In Linux, you can also find Linux kernel information in the file / proc/version. Simply view the contents of this file:
[linuxmi@linux:~/www.linuxprobe.com] $cat / proc/version
You will see output similar to what we saw with uname.
Linux version 5.3.0-28-generic (buildd@lcy01-amd64-009) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) # 30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020
You can see kernel version 5.3.0-28-generic here.
3. Use the dmesg command to find the Linux kernel version
Dmesg is a powerful command for writing kernel messages. It is also very useful when getting system information.
Because dmesg provides a lot of information, you should use a command like less to read it. But since you're just checking the Linux kernel version here, grepping on Linux should provide the required output.
[linuxmi@linux:~/www.linuxprobe.com] $dmesg | grep Linux
The output is only a few lines, but you should be able to easily identify the Linux kernel version.
[0.000000] Linux version 5.3.0-28-generic (buildd@lcy01-amd64-009) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) # 30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 (Ubuntu 5.3.0-28.30~18.04.1-generic 5.3.13) [0.462531] ACPI: Added _ OSI (Linux-Dell-Video) [0.462532] ACPI: Added _ OSI (Linux-Lenovo-NV-HDMI-Audio) [0.462533] ACPI: Added _ OSI (Linux-HPI-Hybrid-Graphics) [0.600862] pps_core: LinuxPPS API ver. 1 registered [1.290385] Linux agpgart interface v0.103 [1.355403] usb usb1: Manufacturer: Linux 5.3.0-28-generic ohci_hcd [16.311337] 08 Manufacturer 42Manufacturer 28.440352 main OS Product: Linux, the study on "how to use commands to check the kernel version of Linux" is over. I hope I can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.