Operating System - Linux
1828592 Members
2596 Online
109983 Solutions
New Discussion

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

 
GnanaShekar
Regular Advisor

How do I determine if the hardware of linux server is 32-bit or 64-bit

Hi,

We have a lot of linux (both redhat and suse) servers in our lab. How do I determine the hardware they are on is 32bit or 64bit. Please suggest.

Thanks & Regards,
-GnanaShekar-
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

Shalom GnanaShekar,

uname -a

You will see a 64 bit reference on 64 bit platforms.

Here is the output from a 32 bit system.
Linux cleartux 2.6.9-22.0.1.ELsmp #1 SMP Tue Oct 18 18:39:27 EDT 2005 i686 i686 i386 GNU/Linux

Notice the i386

That means 32 bit.

You can also figure it out by looking up the model number of the system on the manufacturer's website.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Senthil Prabu.S_1
Trusted Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

Hi,
The command uname -a will tell you whether your hardware is 64-bit compatible.

Example;
#uname -a
Linux hipath2 2.6.5-7.97-smp #1 SMP Fri Jul 2 14:21:59 UTC 2004 i686 i686 i386 GNU/Linux

Here, i686 means it is 64-bit h/w.



HTH,
Prabu.S

One man's "magic" is another man's engineering. "Supernatural" is a null word.
Stuart Browne
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

err, i686 means it's 32bit, not 64 bit.

It'll be 64bit if it says ia64 of x64 somewhere in that output.

Read this thread for more info : http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=939191 or http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=597549
One long-haired git at your service...
Vipulinux
Respected Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

Hi

This is the command :

getconf WORD_BIT

This will give whether ur system is 32 bit or 64

Cheers
Vipul
Ivan Ferreira
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

Stuart is correct, ia64 is 64 bit and not i686. You can also use the "arch" command. Itanium is the only true 64 bit processor.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Stuart Browne
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

I take it you don't think much of AMD's Opteron then? :)

(Nor do I really, but hey! I don't own any).

But there are other 64bit processors, just not near the x86 world.
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

Yes, I forgot about Opteron.

Also, remember that EMT64 is only 64 bit extension for the Intel processor.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Sivakumar TS
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

Hi,

The command uname -a will tell you whether your hardware is 64-bit compatible.

Regards,

Siva.
Nothing is Impossible !
Alan_152
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

What model is the box, and what processor does it have installed in it?
Mike Stroyan
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

The 'uname' based methods all tell you what software is installed on a system. If a 64-bit processor is running a 32-bit version of linux then uname will give you answers that indicate a 32-bit limit. The hardware itself may be able to run a 64-bit linux with a different OS installed.

The 'getconf WORD_BIT' command tells the number of bits in an int. That is only 32 on either a 32-bit or 64-bit processor. You could use "getconf LONG_BIT", which is the number of bits in a long. That happens to be 32 on linux systems with 32-bit pointers and 64 on linux systems with 64-bit pointers. It is not really tied by definition to match the size of a pointer. But it is a practical convention.
Donny Jekels
Respected Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

lshw - its a nice tool - much like

ioscan on HP-UX

lshw --short == ioscan

http://ezix.org/project/wiki/HardwareLiSter
"Vision, is the art of seeing the invisible"
Matti_Kurkela
Honored Contributor

Re: How do I determine if the hardware of linux server is 32-bit or 64-bit

As someone already mentioned, anything based on "uname" or "getconf" will tell you mainly about the 32/64bitness of the Linux OS. If the OS is successfully running in 64bit mode, the hardware is obviously 64bit too... but the opposite is not always true.

The only sure way to know if you have a 64-bit ready hardware (possibly running a 32-bit Linux OS version) is to check the processor model in /proc/cpuinfo.

If it says "Itanium", the hardware is 64bit-only.

If your processor is Athlon 64 (Opteron) or one of the new Xeons, your hardware is capable of running in either 32- or 64-bit mode, and the "uname" or "getconf" methods will tell you which it is currently running.

Anything else on a typical PC hardware is 32bit only.
MK