How do i tell if 32 bit or 64 bit ubuntu is installed on a machine?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
Click here to see the post LQ members have rated as the most helpful post in this thread.
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.
/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.
So init is 32 bit. That is surprising for a Linux distribution with a 64 bit kernel. But it isn't impossible. 32 bit programs can run under a 64 bit kernel.
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?
Yes, at least in cases such as X86 vs. X86_64 where different machine architectures could run on the same CPU.
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:
from the manual page :
-m, --machine
print the machine hardware name
I don't know whether that documentation is entirely misleading or whether it is just misleading for the question asked in this thread.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.