LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to determine if the computer is 32 or 64 bit (https://www.linuxquestions.org/questions/linux-general-1/how-to-determine-if-the-computer-is-32-or-64-bit-4175575920/)

drmjh 03-26-2016 03:43 PM

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?

ferrari 03-26-2016 04:00 PM

Via Linux or Windows?

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

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

ardvark71 03-26-2016 04:43 PM

Quote:

Originally Posted by ferrari (Post 5521676)
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...

the dsc 03-27-2016 12:39 AM

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.

OregonJim 03-27-2016 01:24 AM

(Assuming x86 architecture)

Code:

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

drmjh 03-27-2016 07:58 AM

How to determine whether a computer is 32 or 64 Bit
 
Thanks everybody for the timely & excellent tips. Problem solved.
drmjh

ardvark71 03-27-2016 11:24 AM

Quote:

Originally Posted by drmjh (Post 5521926)
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...

WayneB 03-27-2016 02:56 PM

Code:

getconf LONG_BIT

OregonJim 03-27-2016 04:13 PM

Quote:

Originally Posted by WayneB (Post 5522094)
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.

WayneB 03-27-2016 05:24 PM

Quote:

Originally Posted by OregonJim (Post 5522127)
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

X-LFS-2010 04-03-2016 08:45 PM

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


All times are GMT -5. The time now is 02:01 AM.