8

In order to determine whether or not I have a 64bit OS installed, I have tried the following commands. The output of the commands do not tell me immediately if its a 32bit or 64bit OS.

After looking it up, I know armv7 is a 32 bit architecture. But is there a command that can give an immediate response?

$ uname -m
armv7l
$ uname -a
Linux raspberrypi 5.10.11-v7l+ #1399 SMP Thu Jan 28 12:09:48 GMT 2021 armv7l GNU/Linux
$ arch
armv7l
$ dpkg --print-architecture
armhf

3 Answers 3

11

I believe you can check what bit size Linux kernel is using for LONG type with the following command:

pi@raspberrypi:~ $ getconf LONG_BIT
32

And it might give insight about your OS version :)

4

Second word contains 32-bit:

$ file /lib/systemd/systemd
/lib/systemd/systemd: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=59bb62c73a2fa1a741b6f22657fac8d6a0ce049f, stripped
2
  • 2
    That is not reliable method you can run a dual system with both versions of binaries to be run the 32/64 bit hybrid system idea. Though it can be good way to test for the hybrid running.
    – user130167
    Mar 4, 2021 at 19:07
  • This method is particularly useful when we have multiple micro sd-cards (or other media) installed with raspbian and wish to figure out what is installed on each one of them. Apr 30 at 5:59
2

Enter the command "inxi -f" That should work on most Linux systems. You can also enter "man inxi" for more information. This will only work if the man pages are installed. You can enter "man man" for more information on this command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.