I remember once I googled a topic, and I kept stumbling upon a linux command, that would allow me to get some info on a binary application, including it's architecture. Basicly, I could see if the program was build for x86_64 or for x86.

Now I actually need this command to check if i cross compiled the architecture correctly, but after googling for half an hour I simply can't find it, unbelievably.

It is not my Linux kernel architecture, it is the architecture of a compiled program.

Also, if anyone know the command to do this, can I do it on (shared) libraries aswell?

Thank you very much :)

7 Years
Discussion Span
Last Post by Excizted

I think you're looking for the file command:

sk@sk:~$ file `which bash`
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.