1

Four commands on my pc:

$ dpkg -l |grep linux-image

Linux kernel image for version 3.4.0 on 32 bit x86 SMP

It means my Ubuntu kernel is 32 bits?

$ uname -a
Linux ny 3.4.0-030400-generic #201205210521 SMP Mon May 21 09:22:02 UTC 2012 **x86_64 x86_64 x86_64** GNU/Linux
$ 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.24, BuildID[sha1]=0x37cdd635587f519989044055623abff939002027, stripped
$ file /sbin/init
/sbin/init: ELF 64-bit LSB shared object, **x86-64**, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x7aa29ded613e503fb09fb75d94026f3256f01e7a, stripped

up 3 commands mean my kernel is 64 bits?

My question: What is my kernel, 32 bits or 64 bits? Thanks.

2 Answers 2

0

You can see the programs installed are on their 64-bit version, so I assume it's a 64-bit system.

1
  • This is not always true; on PPC64 it is possible to have a 32-bit kernelspace and a 64-bit userspace. May 18, 2013 at 5:31
0

file only tells you the architecture of binaries. There are cases where a kernel has or uses a different "bitness" userspace (SPARCv9, ARM Thumb), so this cannot be considered accurate.

Only uname gives you direct information about the currently running kernel, therefore you are running a 64-bit kernel.

5
  • $ dpkg -l |grep linux-image ----> Linux kernel image for version 3.4.0 on 32 bit x86 SMP-----what does it mean? Thank you!
    – user159705
    May 18, 2013 at 1:00
  • And? The package manager doesn't run the system. May 18, 2013 at 1:01
  • sorry? what do you mean?
    – user159705
    May 18, 2013 at 1:04
  • 1
    uname -m; i386 = 32bit and x86_64 = 64bit; another command is dpkg --print-architecture May 18, 2013 at 5:30
  • uname -m show the hardware architecture---- Would tell me why the following command output is x86 for my PC? Thank you.---- $ dpkg -l |grep linux-image------ Linux kernel image for version 3.4.0 on 32 bit x86 SMP
    – user159705
    May 18, 2013 at 8:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .