Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

share|improve this answer
    
This is not always true; on PPC64 it is possible to have a 32-bit kernelspace and a 64-bit userspace. –  Ignacio Vazquez-Abrams May 18 '13 at 5:31

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.

share|improve this answer
    
$ 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 '13 at 1:00
    
And? The package manager doesn't run the system. –  Ignacio Vazquez-Abrams May 18 '13 at 1:01
    
sorry? what do you mean? –  user159705 May 18 '13 at 1:04
1  
uname -m; i386 = 32bit and x86_64 = 64bit; another command is dpkg --print-architecture –  GM-Script-Writer-62850 May 18 '13 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 '13 at 8:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.