Hello.

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 :)

Recommended Answers

All 2 Replies

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

That it was indeed! Great, thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.