This is a website by Willem van Zyl

I'm a project manager, software developer, Apple evangelist and geek from South Africa. I'm passionate about web and mobile application development, usability, productivity, physics, astronomy, science fiction and fantasy.

If you would like to contact me, message me on Twitter or send me an email.

How to check kernel, architecture, and release (distribution) information on Linux

10 Jan 2010

Kernel and architecture

The uname command-line utility can be used to check the kernel and architecture of a machine running Linux:

uname -a

... resulting in output like:

Linux ubuntu 2.6.20-16-generic #2 SMP
Tue Feb 12 05:41:34 UTC 2008 i686 GNU/Linux

This output specifies the operating system ("Linux"), nodename on the network ("ubuntu"), kernel version ("2.6.20-16-generic"), and architecture ("i686"), but it doesn't specify the operating system's release information.

Red Hat, Fedora, and CentOS Release Info

To check the release information in Red Hat Enterprise Linux, Fedora, or CentOS, run the following command:

cat /etc/redhat-release

... resulting in output like:

CentOS release 4.8 (Final)

SuSE Release Info

To check the release information in SuSE, run the following command:

cat /etc/SuSE-release

... resulting in output like:

SUSE LINUX 10.0 (X86-64) OSS
VERSION = 10.0

Debian Release Info

To check the release information in Debian, run the following command:

cat /etc/issue

... resulting in output like:

Ubuntu 7.04 \n \l

Ubuntu Release Info

To check the release information in Ubuntu, run the following command:

cat /etc/lsb-release

... resulting in output like:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.04
DISTRIB_CODENAME=feisty
DISTRIB_DESCRIPTION="Ubuntu 7.04"

Other Distributions

If you're unsure which of the above commands you should use, the following command will tell you the name of the file that contains the operating system's release information:

find /etc -iname "*release*"

... resulting in output like:

/etc/lsb-release
Do you like this? Share it:

Copyright © Geekology 2011. All Rights Reserved.

Hosted by Code. Like. Clockwork.