4

Is there a command in Linux that we can run on a compiled shared object(.so) in /usr/lib and know whether it is compiled for 64 bit or 32 bit system? (I mean to know ELF class, like ELFCLASS32)

codey modey
  • 983
  • 2
  • 10
  • 23

1 Answers1

9

You can use the file command. E.g.:

[myuser@mycomputer]$ file /usr/lib/libcurl.so.4.1.1 
/usr/lib/libcurl.so.4.1.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
Mureinik
  • 297,002
  • 52
  • 306
  • 350