[YLUG] How can you find out if an install is 32 or 64 bit?

Roger Leigh rleigh at codelibre.net
Fri May 20 16:13:50 UTC 2011


On Fri, May 20, 2011 at 03:46:14PM +0100, ALEX ARMANI wrote:
> 
> How can you find out if an install is 32 or 64 bit?
> 
> Hi folks. I've got an install of Ubuntu 1o.1o Maverick on my laptop but don't remember if it's a 32 or 64 bit install. Is there an easy way to find out?
> 'uname -a' returns:
>  Linux Anna 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux
> 
> Am I correct in thinking that the i686 indicates it is a 64 bit installation?

No, that's definitely 32-bit (pentium pro and its siblings).  But there
are two things to check:

(Using an amd64 system running Debian unstable with an amd64 install)

1) the kernel

% uname -smo
Linux x86_64 GNU/Linux

2) the userspace environment

% file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
% file /lib/libc-2.13.so 
/lib/libc-2.13.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, stripped

Some people run a 32-bit system with a 64-bit kernel (this brings gains,
for example in permitting large amounts of system memory even though
individual processes are limited to 2 GiB or 3 GiB in certain
circumstances).  So the important one is what the userspace environment
tells you.  If it's 64-bit, both will be 64.  But merely having a 64-bit
kernel doesn't imply having a 64-bit userspace.

Depending upon the distribution, a 32-bit system might be i[3456]86
(depending upon the GCC compiler in use).


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/york/attachments/20110520/34e6445b/attachment.pgp>


More information about the York mailing list