How to find bit size of your Linux/Unix/HP-UX machine

In this post I will help you out with few commands which you can use to find the bit size of your machine. Generally of you are having a 64 bit machine then you will be able to install packages of both 32-bit as well as 64-bit but the same is not applicable for 32-bit machines.


You should be very sure about the machine configuration before you start playing around with it.

Now when you use this command check the difference you will find between 32-bit and 64-bit machine respectively

For Linux machines

# uname -m
i686

# uname -m
x86_64

If you get i386, i586 and i686 in your reply than that signifies your machine is 32-bit but if you get x86_64 or ia64 then your machine will be 64-bit.
# getconf LONG_BIT
32

# getconf LONG_BIT
64
Here you will get an output of bit size either 32 or 64.


For HP-UX machines

# getconf KERNEL_BITs
64

# getconf KERNEL_BITS
getconf: Invalid argument (KERNEL_BITS)

If you are running a 64 bit HP-UX machine, you will get 64 as a reply but for 32 bit machine you will get an error as showed above.
# find /stand/vmunix
/stand/vmunix: PA-RISC1.1 executable
->32 bit

# find /stand/vmunix
/stand/vmunix: ELF-64 executable object file – IA64 ->64 bit

Follow the below links for more tutorials

Leave a Comment