32 bit or 64 bit OS Linux  vps

Check If Linux is 32-bit or 64-Bit

Sometimes new Linux users get confused while downloading a software package because the download page offers both 32 bit and 64 bit versions of the same software. It is important to know whether your OS is 32-bit or 64-bit to download the correct version  In this tutorial, we will discuss four different ways to check if your Linux OS is 32-bit or 64-Bit.

Please note that the methods mentioned in this article are tested on Ubuntu 13.10.

Execute the ‘uname -a’ command

One of the most common way to check if your OS is 32 bit or 64 Bit is by running the uname command.

For example, on my system, it displayed the following information:

$ uname -a
 Linux ubuntu 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013 i686 athlon i686 GNU/Linux

The highlighted i686 (or i386 in some cases) signifies that the operating system is 32 bit, but if x86_64 appears, then it means that the OS is 64 bit.

Execute the ‘uname -m’ command

A similar but slightly different way is to run the ‘uname -m’ command.

For example, on my system, it displayed the following information:

$ uname -m
 i686

Which means that my Ubuntu is 32-bit. If it would have been 64 bit, the output would have been

x86_64.

Using the file command

Although it’s a kind of hack, but still it can be used to solve the purpose. In this case, you have run the file command with /sbin/init as an argument.

Here is an example :

$ file /sbin/init
 /sbin/init: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xc0d86a25a7abb14cad4a65a1f7d03605bcbd41f6, stripped

The highlighted 32-bit signifies a 32-bit OS, and vice-versa.

Using the arch command

Another alternative is to use the arch command, which prints the machine hardware name.

Here is an example:

$ arch
 i686

So you can see that the output was i686, which signifies a 32-bit OS. For a 64-bit OS, the output would have beenx86_64.

Do you know other ways to check if Linux OS is 32 bit or 64 Bit?  Share your ideas in comments below.

 



Tags: , , , ,

Spin up a cloud server in no time flat

Simple setup. Full root access. Straightforward pricing.


DEPLOY SERVER




Leave a Reply