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
Share this article: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • GatorPeeps
  • Digg
  • Reddit
  • muti.co.za
  • DZone
  • del.icio.us
  • StumbleUpon
  • Technorati
  • Ma.gnolia
  • Slashdot

Related posts:

  1. Configuring a Vodafone 3G modem on Ubuntu Linux 9.04 (Jaunty Jackalope)
  2. Ubuntu Linux Quick Tip - Mount a Samba (Windows) file share to a folder
  3. Checking which processes are accessing the Internet on a Unix machine
  4. Checking directory sizes on a Bash command line
  5. Recovering from Linux freezes with “Raising Skinny Elephants Is Utterly Boring”