Linux show kernel version

How To Find Which Linux Kernel Version Is Installed On My System

I am a new proud Linux user. My question to you is – how do I check Linux Kernel version? How do I find my Linux Kernel Version installed on my PC? Any help would be greatly appreciated.

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 level Easy
Root privileges No
Requirements None
Est. reading time 1m

Commands to find your Linux Kernel Version

To check Linux Kernel version, try the following commands:

  1. uname -r : Find Linux kernel version
  2. cat /proc/version : Show Linux kernel version with help of a special file
  3. 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:

So my Linux kernel version is 4.15.0-39, where:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

  • 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:

How to find your Linux Kernel version using hostnamect

Type the hostnamectl command along with grep command:
$ hostnamectl
$ hostnamectl | grep Kernel

This tutorial is also available in a quick video format:

Conclusion

You learned three diffent commands to display and show Linux kernel version on screen. For more info see the following pages too:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Linux Command: Show Linux Version

[a] uname – Print kernel and system information.

Tutorial details
Difficulty level Easy
Root privileges No
Requirements None
Est. reading time 1m

[b] lsb_release – Print distribution-specific information. [c] /proc/version file – Print running kernel information.

How to check linux kernel version number?

Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:
$ uname -r
Sample outputs:

Or type the following command:
$ uname -mrs
Sample outputs:

To print all information, enter:
$ uname -a
Sample outputs:

  • 2.6.32-23 – Linux kernel version number
  • pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
  • SMP – Kernel that supports multi core and multiple cpus.

/proc/version file

Type the following command to see Linux version info:
$ cat /proc/version
Sample outputs:

The above output identifies the kernel version that is currently running. It includes the contents of /proc/sys/kernel/ostype , /proc/sys/kernel/osrelease , and /proc/sys/kernel/version files. For example:
$ cat /proc/sys/kernel/
Sample outputs:

Find Distribution Version

Type the following command:
$ cat /etc/*release
OR
$ lsb_release -a
Sample outputs:

Here is another output from my Debian based server:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

This tutorial is also available in a quick video format:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

List or Check Installed Linux Kernels using command line

H ow do I list all installed kernel on Linux operating system? How do I find out current kernel version?

You can use standard package listing command to list installed Linux kernels on your Linux operating systems. This page shows how to list kernel using the command line.

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Linux command-line
Est. reading time 1m

List or Check Installed Linux Kernels

The command varies from one Linux distribution to another. In other words, you need to type the command as per your Linux distro.

RedHat / CentOS / RHEL / Fedora Linux user

You need to use standard rpm command or yum command to list installed software. Type the following command at shell prompt:
$ rpm -qa kernel
Sample Outputs:

Here is another outputs from RHEL 8 server:

One can run the yum command/dnf command as follows:
yum list installed kernel
OR
dnf list installed kernel

Listing installed kernels on RHEL 8

To list / display current running kernel version

Type the following uname command:
$ uname -r
$ uname -mrs
Sample outputs:

Another outputs from my Ubuntu Linux 18.04 LTS desktop

Find installed kernel version for Debian / Ubuntu / Pop!_OS Linux

Use the dpkg command along with the grep command to list all installed kernel on your Debian or Ubuntu Linux, enter:
$ dpkg —list | grep linux-image
Sample outputs:

Let us see outputs from my Ubuntu Linux 18.04 LTS desktop:

Arch Linux user

Run the pacman command as follows:
pacman -Q | grep linux

SUSE Enterprise Linux or openSUSE Linux user

Execute the following rpm command:
rpm -qa | grep -i kernel
From my OpenSUSE 15.2 server:

How do I find manually compiled and installed kernels that aren’t in the package manager?

Try to locate them in /lib/modules/ directory using the ls command:
ls -l /lib/modules/

Alpine Linux user

Run the apk command:
# apk info -vvv | grep -E ‘Linux’ | grep -iE ‘lts|virt’
And we will see:

How do I list custom compiled kernel?

Use the following find command:
sudo find /boot/ -iname «vmlinuz*»
Here is what I see:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

Please note that vmlinuz is the name of the Linux kernel executable. Typically stored in /boot/ directory. The vmlinuz is a compressed Linux kernel file. It is a bootable file for loading the Linux operating system into memory. On some older Linux distros including latest one, you may find another file called vmlinux. It also the kernel file but in a non-compressed and non-bootable format. To list files in /boot/ run the ls command:
ls -l /boot/
The Linux kernel is compiled by issuing the following command:
sudo make install
The kernel binary on the original UNIX operating system was called unix. When a new Unix kernel containing support for virtual memory was finally written at the University of California at Berkeley, the kernel binary was called vmunix. Hence, the Linux kernel binary is also known as vmlinuz.

Conclusion

You learned how to list installed Kernels version using a bash shell prompt. See how to compile Linux kernel for more information or visit official Linux kernel website here.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

Find Linux / UNIX Kernel Version Command

H ow do I find out what kernel version I am currently running under Debian Linux or any other Linux distribution using a shell prompt? How do I find out Unix kernel version? How can I find out my Linux / UNIX kernel version using the ssh command?

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Linux or Unix
Est. reading time 3 mintues
  1. Linux Kernel version and name.
  2. Print the Unix machine hardware name.
  3. Find out about server processor type.
  4. Display the operating system and more.

uname command to display the Linux or Unix kernel version

This command works under all Linux distributions and other UNIX-like operating systems such as FreeBSD, OpenBSD, Solaris, HP UX, OS X and friends. Type the following command to see running kernel version:
$ uname -r
Output taken from Linux based system:

  • 2 : Kernel version
  • 6 : The major revision of the kernel
  • 22 : The minor revision of the kernel
  • 14 : Immediate fixing / bug fixing for critical error
  • generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel.

Another common usage is as follows:
$ uname -mrsn
Output taken from Linux:

Here is another output from RHEL 8:

My RHEL 8 kernel version

Outputs from my OS X Unix desktop

Outputs from OpenBSD Unix server

For example, at the prompt, I type the following on AIX unix to print OS name:
uname
Sample outputs:

Common uname options

Option Description
-a Behave as though the options -m, -n, -r, -s, and -v were specified.
-i Write the kernel ident to standard output.
-K Write the FreeBSD version of the kernel.
-m Displays the machine ID number of the hardware running the system.
-n Write the name of the system/node to standard output.
-o This is a synonym for the -s option, for compatibility with other systems.
-p Displays the architecture of the system processor.
-r Displays the release number of the operating system.
-s Write the name of the operating system implementation to standard output.
-v Write the version level of this release of the operating system to standard output.

How to find the kernel version with /proc/version file ( Linux only command )

You can also obtain kernel version from /proc/version file by using cat command as follows:
$ less /proc/version
$ more /proc/version
$ cat /proc/version
Sample outputs:

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

See how to use uname and other commands to find the kernel version on Linux or Unix-like oses:

Package management tools ( Linux only command )

You can list all installed kernel and its version with the following command under RHEL / CentOS / Suse / Fedora Linux :
$ rpm -q kernel
Output:

If you are using Debian / Ubuntu , try:
$ dpkg —list | grep linux-image
Output:

Conclusion

We have shown you how to find the version of the Unix and Linux kernel running on your server/desktop/laptop/workstion from the command line. See uname man page here and here for more info.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • 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 • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
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

Comments on this entry are closed.

In Solaris uname -r will give you the solaris release level.
some other usefull options with uname are

uname -s [Operating system]
SunOS

uname -r [Release version]
5.8

uname -v
Generic_117350-27[OS version]

uname -a
SunOS hostname 5.8 Generic_117350-27 sun4u sparc

the last two words describes h/w name and processor respctl[equivalent to -m and -p),

I log on to different RedHat based servers, Can you please update on how to differentiate between Centos, RedHat, Oracle Linux (i.e. RedHat based distributions) sitting remotely.

# uname -a (doesn’t help)
# cat /etc/redhat-relaese (its changed to RedHat as some softwares don’t get installed otherwise.

Quite useful for beginners and mediocre persons.

i need linux fonts

cat /etc/redhat-release
this will give you redh hat version or centos version

this command return the Centos version

Newbie here….kind of got thrown in Linux admin for Centos at work due to staff reduction. Confused about something (well lots of things, but can’t seem to find the answer to this particular question).

]# rpm -qa kernel
kernel-2.6.9-89.0.15.EL
kernel-2.6.9-89.0.19.EL
kernel-2.6.9-89.0.28.EL
kernel-2.6.9-89.0.29.EL
kernel-2.6.9-78.0.22.EL
kernel-2.6.9-89.0.11.EL
kernel-2.6.9-89.0.16.EL
kernel-2.6.9-89.0.23.EL
kernel-2.6.9-89.0.25.EL
kernel-2.6.9-89.29.1.EL
kernel-2.6.9-78.0.5.EL
kernel-2.6.9-78.0.8.EL
kernel-2.6.9-78.0.13.EL
kernel-2.6.9-89.0.18.EL

]# uname -a
Linux xxx 2.6.9-78.0.22.EL #1 Thu Apr 30 19:03:25 EDT 2009 i686 athlon i386 GNU/Linux

Why does rpm -qa show kernel-2.6.9-89.0.xxxxx installed but uname -a shows 2.6.9-78.00.22.EL?

I know this probably really stupid question – sorry 🙁

Send me all shell and kernel cammond of linux or unix

Life is so easy huh? 🙂

Send me all the words in the english language and their uses ( I dont claim that this line is original 😉 )

hahaha…lol…AMukh…ur reply is perfect….life is not that easy

Thank you very much all friend

Utility uname don’t have any info about OS version, only OS platform. uname -p gives
GNU/Linux… No info there are in environment variables. But I need the info like that
openSUSE 12.1 (x86_64)… How to solve this problem? I don’t want to set some environment variable manually…

can you install linux on a computer that has another operating system already installed

Yes, this is possible.

use any VM to install multiple os on same machine

I have installed “Linux mint” I want to know the complete info of my Linux version installed like Linux version kernel version

Thank U Very Much senior and all

xcuse me bro..
i wanna install fedora on VMWARE for running shell and c programming but my vmware is not listing out fedora OS .. what i should do …
It listing out “Linux Kernel 2.6.10” Is it similar to fedora ? Can i run shell scripts and c programz .

how to get the OS manufacturer,OS version,OS serial number and number of registered users on linux machine

sudo cat /etc/passwd | grep /bin/bash
UID’s 1000 and above are valid users plus UID 0 for root

dpkg –list | grep linux-image
ii linux-image-2.6.38-11-generic 2.6.38-11.50 Linux kernel image for version 2.6.38 on x86/x86_64
rc linux-image-2.6.38-8-generic 2.6.38-8.42 Linux kernel image for version 2.6.38 on x86/x86_64
ii linux-image-3.0.0-12-generic 3.0.0-12.20 Linux kernel image for version 3.0.0 on x86/x86_64
ii linux-image-3.0.0-16-generic 3.0.0-16.29 Linux kernel image for version 3.0.0 on x86/x86_64
ii linux-image-3.0.0-17-generic 3.0.0-17.30 Linux kernel image for version 3.0.0 on x86/x86_64
ii linux-image-generic 3.0.0.17.20 Generic Linux kernel image

what does it mean 32 or 64 bit ?

when give uname -a o/p is
Linux xxxxx 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 2 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux

when i do file on some executable it tells it 32 bit.
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped

Источник

Читайте также:  Браузер эксплорер для windows 10
Оцените статью