Linux 32bit or 64bit | Unix Linux Forums | Linux

  Go Back    


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Linux 32bit or 64bit

Linux


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-09-2007
manoj.solaris manoj.solaris is offline
Registered User
 
Join Date: May 2007
Last Activity: 26 May 2014, 6:21 AM EDT
Posts: 230
Thanks: 3
Thanked 1 Time in 1 Post
Question Linux 32bit or 64bit

Hi,

I want to know what is command to know which will tell wheather linux is 32 or 64 bit
The Following User Says Thank You to manoj.solaris For This Useful Post:
haresh.yadav (08-20-2010)
Sponsored Links
    #2  
Old 09-09-2007
porter porter is offline Forum Advisor  
Registered User
 
Join Date: Jan 2007
Last Activity: 8 January 2008, 6:50 PM EST
Posts: 2,965
Thanks: 0
Thanked 5 Times in 5 Posts
If you have gcc installed then compile a trivial "Hello World" program with the "-m64" option, and see if it runs.
Sponsored Links
    #3  
Old 09-09-2007
Quintab Quintab is offline
Registered User
 
Join Date: Dec 2004
Last Activity: 24 June 2014, 12:56 PM EDT
Location: New Jersey
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
You can also try:
Code:
uname -m

, but this may only tell you your machine's architecture!
    #4  
Old 09-16-2007
cassj's Avatar
cassj cassj is offline VIP Member  
Supporter
 
Join Date: Jul 2003
Last Activity: 4 November 2010, 8:37 PM EDT
Location: Interweb
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
I am not an expert but the "getconf" command may be what you need:


Code:
getconf -a | grep  FILESIZEBITS

PLEASE NOTE. I am retracting my answer above, because it's stupid. "getconf -a" does give some good info though all by itself, just not what you are looking for.

Last edited by cassj; 09-16-2007 at 02:14 PM..
Sponsored Links
    #5  
Old 09-16-2007
Crazy_murli Crazy_murli is offline
Registered User
 
Join Date: Jun 2006
Last Activity: 5 November 2008, 4:48 AM EST
Location: UK
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
64-bit or 32-bit OS

uname -a

If its 64-bit linux, it shows x86_64 in the output of the above uname command. Otherwise its 32-bit .

Hope it helps.

Cheers, Bru.
Sponsored Links
    #6  
Old 09-16-2007
porter porter is offline Forum Advisor  
Registered User
 
Join Date: Jan 2007
Last Activity: 8 January 2008, 6:50 PM EST
Posts: 2,965
Thanks: 0
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by Crazy_murli View Post
If its 64-bit linux, it shows x86_64 in the output of the above uname command. Otherwise its 32-bit .
Not true, what happens if it's 64 bit Linux running on DEC-Alpha, Power PC, Itanium, PA-RISC 2.0, ultra-sparc, MIPS, .... etc?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compiler - 32bit or 64bit? Hari_Ganesh Solaris 20 03-11-2010 10:30 AM
32bit to 64bit conversion. demuynckr Programming 7 08-11-2008 10:00 AM
Linux version v.s. 32bit/64bit princelinux Linux 1 11-16-2007 12:45 AM
64bit- or 32bit- processor moxxx68 UNIX for Dummies Questions & Answers 2 01-27-2005 11:12 AM
32bit vs 64bit eloquent99 UNIX for Dummies Questions & Answers 1 07-26-2002 11:07 PM



All times are GMT -4. The time now is 09:41 AM.