Checking if the system's CPU architecture is 32 or 64-bit is very essential. When you install an application it is easy to realize that 64bit applications cannot run on a 32bit system but 32bit applications can run on a 64bit system.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Linux System CPU queries.
In this context, we shall look into how to check if the CPU is 64 or 32 Bit in Linux System.
How to use lscpu command ?
We can use the lscpu command to get CPU information in Linux. To do so, simply Run:
Here, if the "Architecture" shows 'x86_64' then it means you are running on a 64bit system. If it shows 'x86_32', then you running on a 32bit system.
Similarly, if the "CPU op-mode(s)" shows both '32-bit, 64-bit', then your CPU supports 32/64bit. If it only shows '32bit' it means your CPU only supports 32bit.
How to use uname command ?
To do so, Run the following command:
$ uname -m
How to use lshw command ?
lshw is a command to get hardware information and you can use it to get CPU information.
Run the command:
$ sudo lshw -c cpu
The red part is your CPU information.
You can also use grep command:
$ sudo lshw -c cpu | grep width
[Need help in fixing Linux CPU issues? We can help you. ]