How to Check CPU is 64/32 Bit in Linux System

As a system administrator and IT professional, it is very important to know whether the system's CPU architecture is 32 bit or 64 bit.

When it comes to third-party applications you need to be aware of your system architecture because the 64-bit applications can not be run in a 32-bit system. Whereas we can easily run 32-bit applications in a 64-bit system.

This article shows how to check CPU architecture on a Linux machine.

1. Using lscpu command

Lscpu is a handy command to get CPU architecture information in Linux.

Access your terminal and type the following command:

$ lscpu

This command lists the cpu information in your terminal as:

Using lscpu command to get cpu information

Architecture field shows what type of CPU you have. Here x86_64 denotes 64 bit.

The CPU operation mode is 32-bit and 64-bit. That means your CPU supports both 32 and 64 bit instructions.

Note: Most common processor architectures used are : 64-bit (x86-64, IA64, and AMD64) and 32-bit (x86). i686 is part x86 family which is 32 bit.

2. Using uname command

Uname provides your Linux system information and kernel version. Run the following command to get CPU information using uname command.

$ uname -m

Sample output:

x86_64

In this example Linux system is running in 64 bit CPU.

3. Using lshw Command

Lshw is simple command to list hardware information of your Linux system. You can get Linux CPU information by running following command:

$ sudo lshw -c cpu

You will get output in your terminal as:

Using lshw command to get cpu information

You can further filter using grep command, type:

$ sudo lshw -c cpu | grep width

4. Get from /proc/cpuinfo

In Linux, /proc/cpuinfo stores CPU information in a plain text file. In your Linux terminal run the following grep command.

$ sudo grep -o -w 'lm' /proc/cpuinfo | sort -u

You will get following output in your terminal:

lm

The lm flag denotes long mode CPU which is 64 bit. For more CPU information you can execute the following command:

$ cat /proc/cpuinfo

Conclusion

In this article, you have learned how to find if you are using a 32/64 bit CPU in your Linux machine using different command-line utilities.

2 Comments... add one

  1. Yop
    Here,
    sudo lshw -c cpu | grep width
    returns nothing but
    sudo LANG=C lshw -c cpu | grep width
    width: 64 bits
    ;-)
    BTW / french / "width" is translated as "bits"
    Maybe
    sudo lshw -c cpu | grep bits
    is better (same result with or without LANG=C)

    Reply

Leave a Comment