How to find the architecture of OS installed

I'm using Core 2 Duo. From Intel website I found that it is a 64-bit architecture CPU.

Long back I've installed Ubuntu OS on this machine. But I'm not sure if I installed the x86-32 or x86-64 version of Linux. I want to know which version of Linux I'm using. How can I get to know that?

How do I find the same on Windows?


On Unix-like OSes you can type uname -m to show the architecture:

$ uname -m
x86_64

Under Windows follow Microsoft's guide:

To find out if your computer is running a 32-bit or 64-bit version of Windows in Windows 7 or Windows Vista, do the following:

    Open System by clicking the Start button, right-clicking Computer, and then clicking Properties.

    Under System, you can view the system type.

If your computer is running Windows XP, do the following:

    Click Start.

    Right-click My Computer, and then click Properties.

        If you don't see "x64 Edition" listed, then you're running the 32-bit version of Windows XP.

        If "x64 Edition" is listed under System, you're running the 64-bit version of Windows XP.

On Windows Vista and newer you can run the command

wmic os get osarchitecture

to find out whether it's 32 or 64 bit.