Re: FW: 64 bit or 32 bit
Glynn Clements <[email protected]>
| Newsgroups | org.kernel.vger.linux-admin |
|---|---|
| Message-ID | <[email protected]> |
Benoit Rouits wrote:
> > How can I tell if a given system is running a 32bit krnel or a 64bit
> > kernel. I a system capable of running either, but I cannot figure
> > out which kernel is installed on it.
>
> just make a C program like this:
>
> int main()
> {
> printf("address bus is %d bytes\n",sizeof(void*));
> }
> and compile it with cc then run it.
> If it prints 8, it is a 64 bit OS, if it prints 4, it is a 32 bit OS.
That tells you which architecture the program was compiled for, not
which architecture the kernel was compiled for. x86_64 can run both
32- and 64-bit code.
--
Glynn Clements <[email protected]>