Introduction : The Linux kernel is the central (core) component of Linux operating systems. Its responsibilities include managing the system’s resources and the communication between hardware and software components. It also maintains the security of your system. Hence, finding out the version information is a good idea for patching and other sysadmin management tasks.
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | No |
Requirements | None |
Time | 1m |
Commands to find your Linux Kernel Version
To check Linux Kernel version, try the following commands:
- uname -r : Find Linux kernel version
- cat /proc/version : Show Linux kernel version with help of a special file
- hostnamectl | grep Kernel : For systemd based Linux distro you can use hotnamectl to display hostname and running Linux kernel version
Let us see all commands and examples in details.
How to check kernel version on Linux server/desktop/laptop
You need to use then uname command to print certain system information including kernel name. Type the following command to print kernel version number:
$ uname -r
Sample outputs:
4.15.0-39-generic
So my Linux kernel version is 4.15.0-39, where:
- 4 : Kernel version
- 15 : Major revision
- 0 : Minor revision
- 39 : Patch level or number
- generic : Linux distro/kernel specific additional info
Understanding uname command options
To print certain system information you use uname command. It has the following options:
-a, OR --all | print all information |
-s, OR --kernel-name | print the kernel name |
-n, OR --nodename | print the network node hostname |
-r, OR --kernel-release | print the Linux kernel release |
-v, OR --kernel-version | print the kernel version |
-m, OR --machine | print the machine hardware name |
-p, OR --processor | print the processor type or “unknown” |
-i, OR --hardware-platform | print the hardware platform or “unknown” |
-o, OR --operating-system | print the operating system |
Find Linux kernel using /proc/version file
Another option is to type the following cat command:
$ cat /proc/version
Sample outputs:
Linux version 4.19.2 (vivek@nixcraft-asus.nixcraft.com) (gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)) #1 SMP Fri Nov 16 01:38:13 IST 2018
How to find your Linux Kernel version using hostnamect
Type the hostnamectl command along with grep command:
$ hostnamectl
$ hostnamectl | grep Kernel
Related media
This tutorial is also available in a quick video format:
Video 01: Find The Linux Kernel Version Command Tutorial
Conclusion
You learned three diffent commands to display and show Linux kernel version on screen. For more info see the following pages too:
- How to compile and install Linux Kernel from source code
- How do I Upgrade Linux kernel?
- Linux kernel source code here
- How To Find Out FreeBSD Version and Patch Level Number
- How To Find Which Linux Kernel Version Is Installed On My System
- Find Linux / UNIX Kernel Version Command
- How To Find Out If 32 or 64 bit Unix OS Installed On Server
- Linux: Find If Processor (CPU) is 64 bit / 32 bit [long mode ~ lm]
- List or Check Installed Linux Kernels
- Find Linux Kernel Version Command
- Linux Command: Show Linux Version
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 10 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
want to learn linux commands
i want to use linux commands
or you could $ ls /lib/modules
:)
Just type “uname -a”
hi i need information on ftp
and some commands to for ftp
how to bring a binary to windows desktop from linux using ftp
this is the wrong ans posted on this page. the correct command to check the kernel version is
# uname -v
instead of #uname -r . the uname -r command display the kernel release.
Varun
my samsung galaxy s11 phone has a pop up that says kernal panic upload mode.how do i update the latest kernal version for my phone?
How to check kernel version? How do I find Linux kernel version using at shell prompt? Run
more /proc/version
awk '{ print "Your Linux Kernel version: ", $3}' /proc/version
We can also use
sudo dmesg | grep Linux