LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-26-2016, 03:43 PM   #1
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Rep: Reputation: 31
how to determine if the computer is 32 or 64 bit


Is there a quick way to determine if the computer is 64 or 32 bit?
 
Old 03-26-2016, 04:00 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Via Linux or Windows?

Anyway, rather than reinvent the wheel, have a read of this...

http://www.computerhope.com/issues/ch001121.htm
 
3 members found this post helpful.
Old 03-26-2016, 04:43 PM   #3
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Quote:
Originally Posted by ferrari View Post
Via Linux or Windows?

Anyway, rather than reinvent the wheel, have a read of this...

http://www.computerhope.com/issues/ch001121.htm

Thanks ferrari, I bookmarked that one.

Regards...
 
Old 03-27-2016, 12:39 AM   #4
the dsc
Member
 
Registered: May 2009
Distribution: Debian
Posts: 175
Blog Entries: 243

Rep: Reputation: 47
On linux "lscpu" is perhaps easier to recall than cat proc/whatever/cpu/whatnot.

But maybe you need to have it installed, not being a bare-bones default thing, unlike grepping whatever from somewhere.
 
Old 03-27-2016, 01:24 AM   #5
OregonJim
Member
 
Registered: Feb 2016
Posts: 98

Rep: Reputation: Disabled
(Assuming x86 architecture)

Code:
cat /proc/cpuinfo | grep flags | grep " lm " && echo 64-bit || echo 32-bit
(done this way for readability, not efficiency )

Last edited by OregonJim; 03-27-2016 at 01:39 AM.
 
Old 03-27-2016, 07:58 AM   #6
drmjh
Member
 
Registered: Mar 2005
Location: North Carolina, USA
Distribution: Ubuntu
Posts: 308

Original Poster
Rep: Reputation: 31
How to determine whether a computer is 32 or 64 Bit

Thanks everybody for the timely & excellent tips. Problem solved.
drmjh
 
Old 03-27-2016, 11:24 AM   #7
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Quote:
Originally Posted by drmjh View Post
Thanks everybody for the timely & excellent tips. Problem solved.
drmjh
Hi...

I'm glad the solutions work. If you would, please mark this thread as "SOLVED" by clicking on "Thread Tools" directly above your initial post. Thanks!

Regards...
 
Old 03-27-2016, 02:56 PM   #8
WayneB
LQ Newbie
 
Registered: Mar 2016
Posts: 25

Rep: Reputation: Disabled
Code:
getconf LONG_BIT
 
Old 03-27-2016, 04:13 PM   #9
OregonJim
Member
 
Registered: Feb 2016
Posts: 98

Rep: Reputation: Disabled
Quote:
Originally Posted by WayneB View Post
Code:
getconf LONG_BIT
That command does not give a clue about the processor type. It only tells what size "longs" are in the current environment.
 
Old 03-27-2016, 05:24 PM   #10
WayneB
LQ Newbie
 
Registered: Mar 2016
Posts: 25

Rep: Reputation: Disabled
Quote:
Originally Posted by OregonJim View Post
That command does not give a clue about the processor type. It only tells what size "longs" are in the current environment.
My bad. I stand corrected. I was thinking distro bit type. That command is to determine if your distro is 32 or 64 bit.

The code for cpu info is below. The last line in the output will tell if the cpu is 32 or 64 bit

Code:
dmidecode --type processor
Must be root to run.

PS: Other keywords for dmidecode --type are bios, system, baseboard, chassis, processor, memory, cache, connector, and slot

Last edited by WayneB; 03-27-2016 at 05:42 PM.
 
Old 04-03-2016, 08:45 PM   #11
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
avoid knowing which is better. people are moving to either "fresh compiled (all 32 all 64) or "off shelf (all 64)"

what i mean is a mixed system needing to have both for disto to "a crowd having either kinda pc) using one distributed tar - is getting more rare
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
stupid q: how to determine version 64-bit or 32-bit? noknow Linux - Software 29 09-28-2012 04:53 AM
[SOLVED] How to determine if a .a file is 32 bit or 64 bit? Tinyspark Linux - Newbie 10 05-24-2012 03:22 AM
how to determine cpu bit 32 or 64 dgag1 Linux - Software 4 01-30-2006 07:16 PM
how to determine if system is 32 bit or 64 bit? bkevind Linux - Newbie 3 03-16-2005 04:01 PM
Determine Computer name lel800 Linux - Networking 5 01-26-2004 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:35 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
Open Source Consulting | Domain Registration