Current Date: Sun, Apr 11, 2021 3:02 AM

How to check whether a Linux PC is 64-bit or 32-bit using the command line

How to check whether a Linux PC is 64-bit or 32-bit using the command line

When it comes to determining the performance of your computer or operating system, most of you should have heard about 64-bit and 32-bit systems. Both refer to how a computer processor manages data. So how do you check if your Linux system is 32-bit or 64-bit? In this article, Make tech easier will show you how to define it using the GUI and command line.

What's the difference between 64-bit and 32-bit Linux systems?

64-bit systems can handle more data than 32-bit systems. But for effective management, a supporting operating system can communicate with the hardware. Therefore, there are 32-bit and 64-bit distro versions of Linux. A 32-bit Linux distribution can be installed on the 64-bit version, but the reverse is not possible. Most modern computers are typically 64-bit systems.

Check CPU version on Linux PC

Step 1: Launch Terminal.

Step 2: Type the following command and press Enter.

lscpu

"Ls" in the above command stands for "list" and cpu is the CPU. Therefore, the instruction can be interpreted as "detailed CPU listing".

You should see output like this:

[email protected]:~$ lscpu    Architecture: x86_64    CPU op-mode(s): 32-bit, 64-bit    Byte Order: Little Endian    CPU(s): 4    On-line CPU(s) list: 0-3    Thread(s) per core: 2    Core(s) per socket: 2    Socket(s): 1    NUMA node(s): 1    Vendor ID: GenuineIntel    CPU family: 6    Model: 69    Model name: Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz

Note the section CPU op-mode (s)This indicates whether the hardware supports 32-bit and 64-bit.

Check Linux distro version

Now that you know your hardware type, you may want to know if the Linux distribution available on your system is 32-bit or 64-bit. We will define it using both the command line and the GUI.

GUI

Look in the search box for your Linux distribution's programs "About", "System Info" or "Details". Below is an example from Ubuntu 17.10, showing the operating system type.

How to check whether a Linux PC is 64-bit or 32-bit using the command line Tested by GUI

Command line

Launch Terminal and use the uname command as follows:

uname -a

Output:

[email protected]:~$ uname -a    Linux fosslinux 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 09:13:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
How to check whether a Linux PC is 64-bit or 32-bit using the command line Test by command line

if you see x86_64, it means that the distribution running is 64-bit. In addition, it will also list the computer name and Linux Kernel version.