Linux

How do I know if my Linux is 32 bit or 64 bit?

[ad_1]

I need to find out if my Linux server is running on 32-bit or 64-bit system. How do I know if my Linux is 32 bit or 64 bit?

To check if your Linux server is running a 32-bit or 64-bit system, try the following commands:

  1. Get ALL info about CPU on Linux, Execute: lscpu or cat /proc/cpuinfo
  2. Is my running Linux kernel 32bit or 64 bit? Run: getconf LONG_BIT
  3. Is my CPU in 32bit or 64 bit mode? Run: grep -o -w 'lm' /proc/cpuinfo | sort -u

Linux know information about the CPU architecture

Type the following lscpu command:
lscpu
How to Find if Linux is Running on 32-bit or 64-bit
From the above output it is clear that I have:

  • CPU: AMD Ryzen 7 1700 Eight-Core Processor
  • Architecture: x86_64
  • CPU can run: 32bit or 64-bit operating system

Find out CPU is 32bit or 64bit on a Linux system

Simply run the following grep command
grep -o -w 'lm' /proc/cpuinfo | sort -u
Sample outputs:

The lm flag means long mode cpu i.e. 64 bit CPU. For more info type the following cat command to get complete info on your CPU:
cat /proc/cpuinfo
cat /proc/cpuinfo | more

How do I know if my Linux is 32 bit or 64 bit?

Now you know you have an AMD CPU that can run both 32bit and 64 bit operating systems. But, how do I know if my current kernel and Linux distro are 64-bit or 32-bit? Fear not, run the following command:
getconf LONG_BIT
Sample outputs:

The getconf command checks if the Linux kernel is 32 bit or 64 bit. The 64 means I am running 64 bit Linux kernel and Linux distro.

Other Linux command to check if I have a 32-bit or a 64-bit OS

Run
uname -i
For 64bit you will get x86_64 and i386 for 32bit Intel CPU.

A note about GUI method

Open your Linux distros, System Settings window, and select the Details:
How To Check If A Linux System Is 32 bit Or 64 Bit

Use the lshw command

Execute the following lshw command to list all info about CPU:
sudo lshw -c cpu
Sample outputs:

Conclusion

You learned that most Intel-based servers and the computer could run both 32-bit and 64-bit operating system. Further you learned the various command line option to determine whether you are running a 32-bit or 64-bit version of Linux kernel and operating systems.

[ad_2]

Facebook Comments

Show More

Related Articles

Leave a Reply

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

Back to top button