How To Confirm if Your CPU is 32bit or 64bit
I had to download a piece of software today for one of the servers which I haven’t used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on Unix Tutorial.
Some of you probably remember the uname command which also shows you similar information, but uname confirms the running kernel of your OS and not the CPU capability: if you’re booted into 32bit mode, it will not help you to recognize the 64bit potential of your system.
Obtaining CPU information from /proc/cpuinfo
Most Linux distros will have the special /proc/cpuinfo file which contains a textual description of all the features your processors have. This is a very useful file – depending on your task it may help you identify any features of your processors, as well as confirm the overall number of CPUs your system has installed.
Most commonly, the following information is obtained from /proc/cpuinfo:
- processor model name and type
- processor speed in Mhz
- processor cache size
- instruction flags supported by CPU
Here’s how the typical output will look:
The same block of information will be shown for each CPU visible to your system. There will be 2 processor instances for each physical CPU if hyper-treading is enabled, and there will be 2 or 4 processor entries for each physical CPU on dual- and quad-core systems configurations.
How to confirm the 64bit capability of your CPU in Linux
Based on /proc/cpuinfo file, it is quite easy to confirm whether your CPU is capable of 64bit or not. All you have to do is look at the flags which tell you what instruction sets your CPU is capable of.
All the CPUs on your system will have the same type and therefore support the same instruction sets, that’s why in this example the grep command returns 4 similar lines – for the 4 CPU instances found on my system:
What you’re looking for is the following flag: **lm. It stands for X86_FEATURE_LM, the Long Mode (64bit) support. If you can find the “lm” flag among your CPU flags, this means you’re looking at a 64bit capable processor.
As you can see from the example about, the processors in question are 64bit capable.
And this is how /proc/cpuinfo will look on an older system with only 32bit capable CPUs, there’s no lm flag as you can see:
That’s it, hope this little tip helps you next time you’re puzzled about your CPU capabilities!
See also:
- How to install and run 32bit packages on 64bit Debian system
- Confirming whether you’re using a 64bit OS
- Unix Commands
- Unix Glossary
- Unix Reference
I had to download a piece of software today for one of the servers which I haven’t used in a while. A question of confirming the 64bit CPU capability came up, and I realized that I never mentioned it here on Unix Tutorial.
Some of you probably remember the uname command which also shows you similar information, but uname confirms the running kernel of your OS and not the CPU capability: if you’re booted into 32bit mode, it will not help you to recognize the 64bit potential of your system.
Obtaining CPU information from /proc/cpuinfo
Most Linux distros will have the special /proc/cpuinfo file which contains a textual description of all the features your processors have. This is a very useful file – depending on your task it may help you identify any features of your processors, as well as confirm the overall number of CPUs your system has installed.
Most commonly, the following information is obtained from /proc/cpuinfo:
- processor model name and type
- processor speed in Mhz
- processor cache size
- instruction flags supported by CPU
Here’s how the typical output will look:
The same block of information will be shown for each CPU visible to your system. There will be 2 processor instances for each physical CPU if hyper-treading is enabled, and there will be 2 or 4 processor entries for each physical CPU on dual- and quad-core systems configurations.
How to confirm the 64bit capability of your CPU in Linux
Based on /proc/cpuinfo file, it is quite easy to confirm whether your CPU is capable of 64bit or not. All you have to do is look at the flags which tell you what instruction sets your CPU is capable of.
All the CPUs on your system will have the same type and therefore support the same instruction sets, that’s why in this example the grep command returns 4 similar lines – for the 4 CPU instances found on my system:
What you’re looking for is the following flag: **lm. It stands for X86_FEATURE_LM, the Long Mode (64bit) support. If you can find the “lm” flag among your CPU flags, this means you’re looking at a 64bit capable processor.
As you can see from the example about, the processors in question are 64bit capable.
And this is how /proc/cpuinfo will look on an older system with only 32bit capable CPUs, there’s no lm flag as you can see:
That’s it, hope this little tip helps you next time you’re puzzled about your CPU capabilities!
See also:
- How to install and run 32bit packages on 64bit Debian system
- Confirming whether you’re using a 64bit OS
- Unix Commands
- Unix Glossary
- Unix Reference