LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2012, 07:37 PM   #1
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 331

Rep: Reputation: 35
32- or 64-bit binary?


How does one check if a Linux binary is 32- or 64-bit? Thanks
 
Old 02-04-2012, 07:59 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
file filename
 
1 members found this post helpful.
Old 02-04-2012, 08:06 PM   #3
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Quote:
Originally Posted by Geremia View Post
How does one check if a Linux binary is 32- or 64-bit? Thanks
Hi Geremia;
I assume you meab an installed binary, correct? The code below will show what kernel is being used.
Code:
uname -a
Tom
 
Old 02-04-2012, 08:31 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
# file <filename>
command gives the information about 32-bit or 64-bit executables.
 
1 members found this post helpful.
Old 02-05-2012, 10:52 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
Quote:
Originally Posted by tommyttt View Post
Hi Geremia;
I assume you meab an installed binary, correct? The code below will show what kernel is being used.
Code:
uname -a
Tom
That doesn't help much. The running kernel does not necessarily correspond with the bitness of any binary on the system.
 
Old 02-06-2012, 12:18 AM   #6
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 331

Original Poster
Rep: Reputation: 35
Quote:
Originally Posted by AlucardZero View Post
file filename
Excellent! Thank you!
 
  


Reply

Tags
binary


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automake, makefile.am, binary directory, both 32 bit and 64 bit executables? MrUmunhum Linux - Kernel 0 12-26-2011 05:47 PM
segmantation fault on a 64 bit machine caused by binary compiled on a 32 bit machine ninofattore Linux - Newbie 1 10-13-2011 02:48 PM
Compile 64 bit binary from 32 bit machine muhuzuhu Linux - Software 1 09-18-2011 01:10 AM
Compiling 32-bit binary in a 64-bit environment Kaj Linux - Software 1 12-13-2004 10:43 AM
C, read 8 bit octal numbers, convert to 24 bit binary bamalabs Programming 3 01-20-2004 10:59 AM


All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration