How to Find if Linux is Running on 32-bit or 64-bit?

By Aditya varma

March 9, 2017

32-bit, 64-bit, linux commands

How to find if a computer is running 32-bit or 64-bit operating system? If you want to install any new application on Linux or Ubuntu operating systems, It's better you check whether it is compatible with 32 bit or 64 bit OS to avoid any conflicts.

As I am using an Ubuntu system, so lets see how we can check on an Ubuntu server. I will show you different ways of checking whether your Ubuntu system is 32-bit or 64-bit. We will check both from shell and as well as from GUI.

Before we proceed with commands, lets see few basics about 32-bit and 64-bit OS.

Basics about 32-bit and 64-bit OS

In early 90's the processors use to run on 32-bit architecture.  It means their data bus had the capacity of handling 32-bit at a time. As the technology grew, 64-bit processors replaced 32-bit.

64-bit processors have a data bus with 64-bit. It means they can handle at least twice the fast when compared to 32-bits. To meet the requirements with 64-bits processors, operating systems released their 64 bit versions.

How to check with the command "uname"

The first two methods involve "uname" command which prints system information on the screen. If you want more information about 32-bit or 64-bit, just type the following command and press "Enter"

uname -a 

On your screen you will see the information displayed in the below image. Let's see this in order to understand the structure. 

  1. Kernel Name
  2. Network node hostname
  3. Kernal Release
  4. Kernal Version
  5. Machine Hardware name
  6. Processor type
  7. Hardware platform
  8. Operating System

The machine hardware name lists whether your system is 32-bit ("i686" or "i386") or 64-bit ("x86_64"). Notice that the processor type and hardware platform also indicates 32-bit or 64-bit.

Checking if 32-bit or 64-bit using uname -a.png

Trying with uname -m

To know whether your system is 32-bit or 64-bit, type the command "uname -m" and press "Enter".

uname -m 

This displays only the machine hardware name. It shows if your system is running 32-bit (i686 or i386) or 64-bit(x86_64).

Checking version using uname -m

How to check with "arch" command

There is another command similar to "uname -m" which is “arch”, it prints to the screen whether your system is running 32-bit (“i686”) or 64-bit (“x86_64”). Just give the following command and press "Enter". You can check the result in the following image.

arch
Checking with arch command

​How to check "file" command with special arguments

You can also use the command “file” with a special argument (“/sbin/init”) to find out whether your system is running 32-bit or 64-bit. Type the following command and press "Enter".

file /sbin/init

The following is the output you see on the screen. You can check the software version and it looks like "64-bit".

Checking with command

Using "lscpu" command

This command displays complete CPU architecture. Where we can see if the CPU is having 32-bit or 64-bit. You can check the below image for more details.

checking with  lscpu command

Let's jump to the Graphical Mode

If you would rather use a graphical tool to find out whether your system is 32-bit or 64-bit, you can check from “System Settings”. Click the “System” menu button (gear button) in the upper-right corner of the screen and select “System Settings” from the drop-down menu.

In this “System Settings” window check for “Details”  button in the “System” section, as shown below.

Checking from GUI

Your “Details” screen displays. On the “Overview” screen, the “OS type” is listed as either “64-bit” or “32-bit,” along with other basic information about your Ubuntu system. You can check it from the below image.

Basic Ubuntu Information
Note: One thing to remember is that a 64 bit processor can support both 32 bit and 64 bit OS but a 32 bit processor can only run 32 bit OS.

Conclusion

I think this quick post helped you to know if you have 32-bit or 64-bit OS. Hope you enjoyed reading this article? If so leave your comments in the below message box.​

Leave a Reply

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

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Create a website in 3 simple steps

Choose a website template, add features, then customise! - Free Online Website builder.