How do i tell if 32 bit or 64 bit ubuntu is installed on a machine?
I've tried all the uname options. uname -m says "x86_64", but that might just be describing the hardware, not the software. In /boot, in config-2.6.24-16, CONFIG_64BIT=Y, so maybe that means it's 64-bit?
|
Try 'cat /proc/version' and see if the linux version info says amd64 or not.
Another option would be to fire up synaptic or something and see what version(s) of 'linux-image' (the kernel package) you have installed, assuming the kernel is a stock one and not manually compiled. |
Quote:
So you have a 64-bit kernel. Quote:
|
"file /sbin/init" will give you a pretty good indication.
|
file /sbin/init gives:
/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped cat /proc/version gives: Linux version 2.6.24-16-generic (buildd@yellow) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Thu Apr 10 12:47:45 UTC 2008 So, given other comments, I will assume I have a 64-bit kernel. Which eliminates the need for a backup (right this instant), since I won't be reinstalling. Thanks to all who chimed in. Larry Lewis |
What am I runnung?
Please help. I ran all three tests and it looks like they contradict each other. Am I running 32 or 64 bit kernel?
uname -r 2.6.26-2-amd64 CONFIG_64BIT=y # CONFIG_X86_32 is not set CONFIG_X86_64=y file /sbin/init /sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped First two suggest I am running 64 bit. Third one definitely point to 32 bit. Thank you. |
Quote:
Quote:
Quote:
|
Thank you for fast response. I am obviously a newbie and have to do more reading. Does it mean that init is not part of the Kernel? Should I worry that it is 32 bit? Would it hunt me later?
Thank you. |
Quote:
from the manual page : -m, --machine print the machine hardware name |
Quote:
uname -m will definitely say "X86_64" only when the kernel was compiled for X86_64 architecture. It will not give "X86_64" when an X86 kernel is running on X86_64 hardware. Quote:
Running an old X86 kernel (2.4.21-47.0.1.ELsmp) on an X86_64 CPU, I find that uname -i displays "i386" while uname -m and uname -p each display "i686". IIUC, that means the kernel was compiled to run on some X86 variant less than "i686" (not really a 386, because in Linux i386 doesn't really mean 386 anymore.) But the kernel can recognize that is running on a processor supporting the "i686" super-set of "i386". So there can be both a hardware and software component to the information displayed by uname -m or uname -p. |
johnsfine thanks for the expanded explanation about that.
|
getconf LONG_BIT
That'll do the trick:) |
@spurnyn
You're running a 2.6.26 which is a VERY old kernel. I'd be worried about that. What version of Debian are you running? ciao, jdk |
Another old thread, jdkaye.
|
:redface: aaaaaaaarrrrrrrrrrrrrrrgggggggggggggggggghhhhhhhhhhhhhh! I keep getting caught. :banghead:
Sorry about that. Old thread=old kernel. jdk |
All times are GMT -5. The time now is 04:04 AM. |