Get information about the installed linux distribution, kernel and version

Get the kernel version

$> uname -a

Example output:

Linux bravehartk2-ThinkPad-W520 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Or:

$> uname -r

Example output:

3.13.0-32-generic

You can even use the following command to get the kernel version. It will also serve you information about the build date and a few more facts:

$> cat /proc/version

Example output:

Linux version 3.13.0-32-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014

This tells you the exact kernel version (3.13.0-32-generic), who compiled the kernel (buildd@kissel),
the gcc-version (@see http://en.wikipedia.org/wiki/GNU_Compiler_Collection) that was used for compiling your kernel (gcc version 4.8.2),
the kernel type (SMP -> Symmetric-Multi-Processing -> @see http://en.wikipedia.org/wiki/Symmetric_multiprocessing)
and the build date of your kernel (Tue Jul 15 03:51:08 UTC 2014).

Get whether you are on a 32-bit or 64-bit system

$> uname -a

Example result:

Linux bravehartk2-ThinkPad-W520 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

The bit-version is x86_64 (64-bit version) or  i386 (32-bit version).

Or better:

$> uname -i

This will just give you x86_64 (64-bit version) or  i386 (32-bit version).

Get the version of your operating system

$> cat /etc/issue

Example output:

Ubuntu 14.04.2 LTS \n \l

In this example you are using a Ubuntu Linux 14.04 LTS (Long Term Support).

You’ll get the same information in a more structured way, when using the following command:

$> lsb_release -a

Example output:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:    14.04
Codename:   trusty

CentOS

On CentOS you can even use:

$> cat /etc/centos-release

… or in earlier Versions (< 6):

$> cat /etc/redhat-release

 

1 thoughts on “Get information about the installed linux distribution, kernel and version

Leave a Reply

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

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.