proper way to determine arch of *installed* OS, not processor?

Robert P. J. Day rpjday at crashcourse.ca
Fri May 6 17:55:10 UTC 2011


On Fri, 6 May 2011, Oliver Grawert wrote:

> hi,
> Am Freitag, den 06.05.2011, 11:14 -0400 schrieb Robert P. J. Day:
> > what is the proper incantation to determine the word size of the
> > installed OS?  that is, if i've installed the 32-bit version of ubuntu
> > on a 64-bit system, i want to know that the OS is 32 bits, even as the
> > processor is 64 bits.  i'm sure it's some option of "uname", but i
> > don't have such a system lying around to test it.  thanks.
> if its a dpkg based system and you really care about OS and not HW, why
> not use:
>
> dpkg --print-architecture
>
> 32bit will print i386
> 64bit will show amd64

  i should have been clearer that i need something that is
linux-agnostic; hence my reference to "uname", but i don't remember if
any of the uname options specifically report "32" when it's a 32-bit
install on a 64-bit system.

  i see this very question on an occasional basis, so there must be an
answer somewhere.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================




More information about the ubuntu-users mailing list