How to Find Linux Distribution and Linux Kernel Information

LinuxFind out information about your Linux distribution, such as version, vendor and kernel version and architecture, using the Linux command line.

Linux Distribution Information

To find out which Linux distribution you have you run the following command as root:

lsb_release -a

It should give you output like below:

LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description:    openSUSE 12.1 (x86_64)
Release:        12.1
Codename:       Asparagus

You can see from the above that the distributor is SUSE Linux and the distribution is OpenSUSE version 12.1 with 64bit architecture.

Another example from a Debian system:

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.7 (squeeze)
Release:        6.0.7
Codename:       squeeze

In the above instance we see a Debian Squeeze system.

If lsb_release doesn’t work you can find out information about Linux distro using the following command:

cat /etc/issue

Which will display something like this:

Welcome to openSUSE 12.1 "Asparagus" - Kernel \r (\l).

Linux Kernel Version

You can find out the kernel version using the following command:

uname -a

Which will display:

Linux 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27 05:21:40 UTC 2012 (d016078) x86_64 x86_64 x86_64 GNU/Linux

You can see a few things above.

  • It shows that you are using Linux and the hostname is displayed followed by the kernel version 3.1.10-1.16-desktop.
  • It is an SMP kernel designed for systems with multiple CPU cores and it has a preemptive CPU scheduler.
  • x86_64 tells you that this system has a 64bit kernel. A 32bit kernel, OTOH, would have been displayed as i386.

Leave a Reply

Your email address will not be published. Required fields are marked *