Skip to content


HOWTO: Determine if Linux is 32-bit or 64-bit

If you need to check if a Linux installation is running on a 32-bit or a 64-bit processes, you can use the uname command for that:

$ uname -i
i386

i386 is a 32-bit machine, while x86_64 or ia64 are 64-bit cpu’s

You can check /proc/cpuinfo for more information about the number and types of cpu on a system.

If you want to check the version of an executable file on Linux, you can do so with the readelf command

readelf -h oracle
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x829934c
  Start of program headers:          52 (bytes into file)
  Start of section headers:          84699856 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         31
  Section header string table index: 28

Posted in Linux, Oracle. Tagged with , .

One Response

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. nrmrvrk said

    Thank you for posting this! This information was very helpful and surprisingly hard to Google. 15yrs using Linux and this is the first time I’ve had to do this. Thanks!

You must be logged in to post a comment.