General
cancel
Showing results for 
Search instead for 
Did you mean: 

how to find if my OS is 32 or 64 bit

SOLVED
Go to solution
Matt Shaffer_1
Regular Advisor

how to find if my OS is 32 or 64 bit

is there a file or command in redhat ES 3 update 4 that shows if the OS is 32 or 64 bit?
13 REPLIES
Stuart Browne
Honored Contributor

Re: how to find if my OS is 32 or 64 bit

Not explicitly, however using 'uname -m' is pretty close. If that command doesn't output either 'ia64' or 'x86_84', it's not Itanium or Opteron. This doesn't check for PPC64 or others though. If you're expecting to go to those sorts of platforms, then search through the forums for a similar post a few weeks ago.
One long-haired git at your service...
Mike Stroyan
Honored Contributor

Re: how to find if my OS is 32 or 64 bit

If you want a more general but tenuous way to infer a 32 vs. 64 bit kernel you could use
ls -l /var/log/lastlog

If that file is over a terabyte in size, you have a 64 bit kernel ;-)

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156809
Gopi Sekar
Honored Contributor
Solution

Re: how to find if my OS is 32 or 64 bit


uname -a is your friend.

Also you can do rpm query of kernel to find out whether it is a 32 bit kernel or 64 bit.

just do 'rpm -qi kernel' which will give installed kernel information including processor architecture.

if the above does not work try 'rpm -qi kernel-smp'

Hope this helps,
Gopi
Never Never Never Giveup
Guru Dutta
Frequent Advisor

Re: how to find if my OS is 32 or 64 bit

I guess the other way of doing this is by using isainfo -v which will tell you if your machine is 32/64 bit.This works in solaris not sure if a similar tool is in RH


Dutta
Stuart Browne
Honored Contributor

Re: how to find if my OS is 32 or 64 bit

Unfortunately, 'isainfo' isn't a Linux command I'm either familier or can find for the Linux platform.
One long-haired git at your service...
Matt Shaffer_1
Regular Advisor

Re: how to find if my OS is 32 or 64 bit

thanks to everyone for your suggestions. unfortunately, none of these gave me what I needed. I'll continue to search.
Stuart Browne
Honored Contributor

Re: how to find if my OS is 32 or 64 bit

Then tell us in a bit more detail what you are looking for?

Do you just want something that says "32" or "64" as it's output? That would be incomplete, and not helpful at all, due to the fact that on Linux, the architecture is what counts, now how many bits that architecture is.

For example, something compiled for 'i386' won't work on a 'ppc' arch, even though they are both 32bit.

Someting compiled for 'ppc64' won't work on 'ia64', even though they are both 64 bit.

It's not as cut-and-dried as a same numbered HP-UX versions on 32 or 64 bit platforms, as their architecture for HP-UX boxes are either Itanium 64bit, or PA-RISC 32bit (is there a 64bit PA-RISC? I'm not sure).
One long-haired git at your service...
Matt Shaffer_1
Regular Advisor

Re: how to find if my OS is 32 or 64 bit

Thanks again everyone. I found out from HP that you can decifer the kernel revision by the output you get from uname -a. here's a big FYI:

You can tell whether you are running a 32 bit, 64 bit or Itanium kernel with the command "uname -a". The output will indicate the kernel revision and the CPU type; i686 (Intel x86 32-bit), x86_64 (AMD64/EM64T) or ia64 (Itanium).


thanks again
Matt
Ross Minkov
Esteemed Contributor

Re: how to find if my OS is 32 or 64 bit


Matt,

Gopi did point out that uname -a will give you that. He even gave you another command that will give even more details for the kernel rpm (rpm -qi). Read his post again.

-Ross
Stuart Browne
Honored Contributor

Re: how to find if my OS is 32 or 64 bit

... did you even read my first post ?

'uname -m' (machine type) shows only the architecture portition of a 'uname -a' (all) output.
One long-haired git at your service...
Matt Shaffer_1
Regular Advisor

Re: how to find if my OS is 32 or 64 bit

I did read yours and everyone else's post Stuart. I just didn't make the connection with the output of uname -m and what kernel this was indicating. I didn't realize that i686 meant that I had a 32 bit kernel. Now I do. Thanks
generic_1
Respected Contributor

Re: how to find if my OS is 32 or 64 bit

Even if you have 64 bit OS you need 64 Bit applications to take full advantage of it :)
Matt Shaffer_1
Regular Advisor

Re: how to find if my OS is 32 or 64 bit

.