Re: the "proper" way to identify the bitness of your kernel and CPU

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

 



2009/4/3 Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>:
> On Fri, 3 Apr 2009, Sharpe, Sam J wrote:
>
>> 2009/4/3 Robert P. J. Day <rpjday@xxxxxxxxxxxxxx>:
>> >
>> >  what is the fedora-approved way to identify the wordsize of both
>> > your running kernel and your CPU?  for the kernel, i'm used to running
>> >
>> >  $ uname -r
>> >
>> > and just looking at the suffix, which in my case would be either
>> > "i686" or "x86_64".  is there a simpler way?
>>
>> # man arch
>>    NAME
>>        arch - print machine hardware name (same as uname -m)
>>
>> # arch
>> x86_64
>>
>> # uname -m
>> x86_64
>
>  hang on ... if i have a 32-bit kernel running on a 64-bit CPU, what
> will the above print?  i'd want it to print, well, i686 or something
> that represents 32 bits.  is that what it would do?

Yes, it's the right way to run "uname -r" and look at the suffix...
it's the same thing, only it just prints out the suffix.

e.g. A 64bit capable CPU with a 32 bit (RHEL5) OS:

[sam@machine ~]$ arch
i686 (this represents the installed kernel architecture)

[sam@machine ~]$ [[ $(grep lm /proc/cpuinfo) ]] && echo x86_64 || echo i686
x86_64 (this represents the processor architecture)

-- 
Sam

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[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