The number of CPU instruction sets has kept growing, and likewise for the operating systems which are able to run and support on more than one CPU system architecture. For example, a Linux OS such as Ubuntu, Fedora, Redhat, Linux Mint, Debian, Arch Linux, openSUSE and CentOS can run on Intel or AMD CPU in either 32-bit or 64-bit flavor. In addition, some Linux also supports ARM CPU in both 32-bit and 64-bit versions.

So something it’s important to check and verify the edition and flavor of operating system been installed on the computer, before performing tasks such as installing new applications and kernel upgrade, so that the matching version could be installed to ensure proper compatibility.

If you want to know whether the Linux running on your machine is of 32-bit or 64-bit variant, and also the type of microprocessor instruction sets architecture of the machine, run the following command on the CLI:

uname -a

The result will be something similar to any of the following lines:

Linux server.mydigitallife.info 2.6.32-431.5.1.el6.x86_64 #1 SMP Wed Feb 07 07:07:07 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Or,

Linux Middlebin-Ubuntu 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:05:41 UTC 2011 i686 athlon i386 GNU/Linux

Or,

Linux host 3.13.7-1-ARCH #1 PREEMPT Mon Mar 8 07:07:07 MDT 2012 armv5tel GNU/Linux

UNAME

Uname is the command that is used in Linux to print the name, version and other details about the current machine and the operating system running on it. The version of Linux kernel be installed on the system can be deduced from the result above, for example:

i386 – 32-bit kernel
x86_64 – 64-bit kernel
armv5tel – ARMv5

The possible values including i386; i686; x86_64; ia64; alpha; amd64; arm; armeb; armel; hppa; m32r; m68k; mips; mipsel; powerpc; ppc64; s390; s390x; sh3; sh3eb; sh4; sh4eb; sparc and etc.

There may be multiple entries as uname returns values for many variables such as system kernel, operating System (or distribution), machine, processor, hardware platform and more. Normally all values should be the same, but some instruction sets architecture does provide backward compatibility, which means it supports more than one variant of operating systems. For example, one can install 32-bit or 64-bit operating system on a x64 CPU processor. Just select the one with highest comparability.

If you want specific information about your system, you can use different switch option to return just the information you want, instead of everything about your system.

Here’s the options that can apply to uname command:

-s, --kernel-name [print the kernel name]
-n, --nodename [print the network node hostname]
-r, --kernel-release [print the kernel release]
-v, --kernel-version [print the kernel version]
-m, --machine [print the machine hardware name]
-p, --processor [print the processor type or "unknown"]
-i, --hardware-platform [print the hardware platform or "unknown"]
-o, --operating-system [print the operating system]