Re: how to identify 32 vs 64 bit CPU?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 09 August 2007 1:36:10 pm Robert P. J. Day wrote:
> On Thu, 9 Aug 2007, Rick Stevens wrote:
> > On Thu, 2007-08-09 at 17:50 +0100, Chris Jones wrote:
> > > > How about uname?  `uname -a` gives all of it.  See `man uname` for
> > > > subsets and the ordering of the "-a" output.  If you need more than
> > > > just x86, I think any solution will be a bit involved.
> > >
> > > AFAIK, uname only tells you what you are running, not what you *could*
> > > run. I.e. you couldn't tell the diffrence between a 32 bit os on a 64
> > > bit capable machine or a 32 bit only machine.
> >
> > If you get a result from
> >
> >     cat /proc/cpuinfo | grep " lm "
> >
> > you're on a 64-bit processor regardless whether it's a 32- or 64-bit OS.
> > If you want to know if the OS is 64-bit, then a result from
> >
> > 	uname -a | grep 64
> >
> > would indicate a 64-bit OS.
>
> um ... that looks dangerous, since it could find the string "64"
> *anywhere" in the output from "uname -a", including in the kernel
> version number or elsewhere, no?
>
> if it was 64-bit F7, what *exactly* should "uname -a" print to
> identify that?
>
Linux <hostname> 2.6.22.1-27.fc7 #1 SMP Tue Jul 17 17:19:58 EDT 2007 x86_64 
x86_64 x86_64 GNU/Linux

so you could grep for x86_64 to see if a 64 bit os is in use.

the lm flag AFAIK is the most reliable way to know if the box is 64 bit 
capable regardless of a 64 bit os or not

Dennis

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux