If kernel type (64/32) is no indication of what bit your distribution is, how do I know what I'm running? I'm on Ubuntu, and I just found out, to my surprise, you can use a 64 bit kernel on a 32 bit Linux distribution... so how can I tell for sure what type of software I'm running, 64 bit or 32 bit?
Just run this on the command line
It will return 32 or 64
in the terminal should display helpful information to clarify what you're running on any given machine.
I would say it is very rare that you would have a kernel that is set up out of sync with the software of the distro as a whole, certainly I've never come across anyone who configured it that way, so generally you can expect x86_64 to represent a 64 bit operating system and kernel pretty much whenever you encounter it.
Since you are in ubuntu, for any given bit of software you can simply run:
and look for the telltale signs, for example my results for skype:
With a 32-bit kernel, you know all applications must be 32-bit. With a 64-bit kernel, there can be any mix of 32-bit and 64-bit applications and libraries. You have to check the applications you care about to see what type they are. You can use the
file
command to check the bitness of a library or executable.If you can't remember any of the others, and I can't, then the following 'trick' works, just print the length of a pointer in C/C++:
This will give '4' on 32-bit os (ie 4 bytes = 32 bits), and '8' on 64-bit os (ie 8 bytes, = 64 bits).