LinuxQuestions.org
Review your favorite Linux distribution.
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, 06:37 PM   #1
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 492

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


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

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
file filename
 
1 members found this post helpful.
Old 02-04-2012, 07: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, 07:31 PM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

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, 09:52 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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-05-2012, 11:18 PM   #6
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 492

Original Poster
Rep: Reputation: 45
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 04: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 01:48 PM
Compile 64 bit binary from 32 bit machine muhuzuhu Linux - Software 1 09-18-2011 12:10 AM
Compiling 32-bit binary in a 64-bit environment Kaj Linux - Software 1 12-13-2004 09:43 AM
C, read 8 bit octal numbers, convert to 24 bit binary bamalabs Programming 3 01-20-2004 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 PM.

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
Open Source Consulting | Domain Registration